chore: Merge KAS and Redis charts into Console chart#3302
Conversation
Greptile SummaryThis PR consolidates the separate KAS and Redis Helm charts into the console chart by inlining all KAS templates directly under Key changes:
Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| charts/console/templates/kas/redis/_helpers.tpl | New dedicated redis.fullname helper using console.fullname + -redis suffix (correctly caps at 63 chars). Properly scoped redis.secretName, redis.password, and TLS helpers. The redis.password helper mutates .Values.kas.redis.global.redis to propagate the resolved password — standard Bitnami pattern that works correctly. |
| charts/console/templates/kas/deployment.yaml | New KAS deployment template. Correctly includes initContainers key, projected volume with Redis secret at redis_server_secret, and dual-container (kas + api) spec. However, several {{ if }} blocks lack trim markers ({{- }}) causing extra blank lines in the rendered YAML, and the api container hardcodes the console-env secret name. |
| charts/console/templates/kas/configmap.yaml | KAS config correctly references {release}-redis-master via the new redis.fullname helper, resolving the previous concern about ambiguous naming. Redis password_file path matches the volume mount path redis_server_secret in deployment.yaml. |
| charts/console/templates/kas/redis/master/application.yaml | Comprehensive Redis master StatefulSet/Deployment template ported from Bitnami. Correctly handles standalone mode with volumeClaimTemplates for StatefulSet and standalone PVC for Deployment. The YAML nesting of the volumes/volumeClaimTemplates sections is correct. |
| charts/console/values.yaml | kas section moved to bottom of file and fully expanded with all Redis sub-values inlined. replicCount renamed to replicaCount (breaking rename for any existing overrides). kas.secrets.redis: "" still present, which creates an orphaned bare-named Secret. No kas.enabled guard, but this was already the case before. |
| charts/console/templates/kas/secrets.yaml | Creates bare-named Kubernetes Secrets (api, privateapi, redis) without release-name prefixes. The redis key creates an empty Secret that is mounted but never read by KAS config (password comes from the embedded Bitnami Redis secret instead). |
| charts/console/Chart.yaml | kas dependency removed, common 2.34.0 dependency added to provide Bitnami common helpers for the inlined Redis templates. The comment explaining the version choice (closest to 2.33.2) is helpful. |
| charts/console/templates/ingress.yaml | Hardcoded console-kas-service references correctly replaced with kas.serviceName helper. Dynamic resolution now works regardless of release name. |
Comments Outside Diff (1)
-
charts/console/templates/kas/deployment.yaml, line 253-262 (link)Hardcoded
console-envresource name breaks non-default release namesThe
apisidecar container references a Kubernetes resource namedconsole-envby literal string for bothKAS_HOSTandCONSOLE_HOST. If the chart is installed with a release name other thanconsole(e.g.,helm install my-console ./charts/console), this hard-coded reference will fail at pod startup because the resource will not exist under that exact name.All other resources in the chart derive their names through the
console.fullnamehelper. Consider using the same pattern here so the name resolves correctly regardless of release name:name: {{ include "console.fullname" . }}-envThis should be applied to both
secretKeyRef.namefields in theapicontainer'senvblock.
Last reviewed commit: 642246f
…l-codebases-should-have-docker-compose-files-capable-of
…urity and resource settings
…utoscaling settings
…s, secrets, and API paths
…improved consistency
…naming conventions
…to simplify configuration
… maintain consistency
… configuration scoping
…rences to correct file paths in application.yaml
…keys for proper scoping
…s.fullname for improved resource scoping and naming consistency
…l-codebases-should-have-docker-compose-files-capable-of
…l-codebases-should-have-docker-compose-files-capable-of
…l-codebases-should-have-docker-compose-files-capable-of
| - Ingress | ||
| - Egress | ||
| {{- if .Values.kas.redis.networkPolicy.allowExternalEgress }} |
There was a problem hiding this comment.
allowExternal: true default means KAS pods must be explicitly labeled when tightened
The default kas.redis.networkPolicy.allowExternal: true permits any pod in the cluster to reach Redis. If an operator tightens this to false later, only pods labeled {{ redis.fullname }}-client: "true" are allowed in — but nothing in the chart adds that label to the KAS deployment pods. At that point KAS would be silently blocked from Redis.
Consider either documenting this label requirement in a comment in values.yaml, or adding the label to the KAS pod template when networkPolicy.allowExternal is false:
# In kas/deployment.yaml pod template labels:
{{- if and .Values.kas.redis.networkPolicy.enabled (not .Values.kas.redis.networkPolicy.allowExternal) }}
{{ include "redis.fullname" . }}-client: "true"
{{- end }}
Fixes PROD-4288 too.
Test Plan
Deployed on plrl-dev-aws.
Checklist
Plural Flow: console