fix: bitnami image hardcoded in init container definition - #41257
Conversation
WalkthroughUpdates Helm chart version to 3.6.5 and changes initContainer image references in the Deployment template to use values-driven registry/repository/tag fields for Redis, MongoDB, and PostgreSQL instead of hardcoded defaults. No other logic or fields are modified. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Helm user
participant Helm as Helm Renderer
participant Values as values.yaml
participant Tmpl as deployment.yaml (template)
participant K8s as Kubernetes API
Dev->>Helm: helm install/upgrade
Helm->>Values: Load .Values
Helm->>Tmpl: Render with .Values
note right of Tmpl: Build initContainer images from<br/>redis/mongodb/postgresql<br/>registry+repository+tag
Tmpl-->>Helm: Rendered Deployment manifest
Helm->>K8s: Apply manifest
K8s-->>Dev: Deployment created/updated
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
deploy/helm/templates/deployment.yaml (5)
68-69: Good fix; consider guarding empty registry to avoid leading slash.If registry is empty (common for Docker Hub), this renders "/repo:tag". Add conditional prefixing of the registry.
Apply this diff:
- image: "{{ .Values.redis.image.registry }}/{{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}" + image: "{{- if .Values.redis.image.registry }}{{ .Values.redis.image.registry }}/{{ end }}{{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}"Also verify the resulting image contains redis-cli, since the init command depends on it.
77-78: Same guard for MongoDB image + minor spacing nit.Prevent a leading slash when registry is empty and remove the double-space after the colon.
- image: "{{ .Values.mongodb.image.registry }}/{{ .Values.mongodb.image.repository }}:{{ .Values.mongodb.image.tag }}" + image: "{{- if .Values.mongodb.image.registry }}{{ .Values.mongodb.image.registry }}/{{ end }}{{ .Values.mongodb.image.repository }}:{{ .Values.mongodb.image.tag }}"Please confirm the selected image provides mongosh.
86-87: Same guard for PostgreSQL image.Avoid rendering "/repo:tag" if registry is unset.
- image: "{{ .Values.postgresql.image.registry }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}" + image: "{{- if .Values.postgresql.image.registry }}{{ .Values.postgresql.image.registry }}/{{ end }}{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
82-89: pg_isready uses undefined shell vars; inline Helm values to avoid failures.$postgresuser and $postgresdb aren’t defined in this init container. Inline the values so readiness works regardless of env.
- command: ['sh', '-c', "until pg_isready -U $postgresuser -d $postgresdb -h {{.Release.Name}}-postgresql.{{.Release.Namespace}}.svc.cluster.local; do echo waiting for postgresql; sleep 2; done"] + command: ['sh', '-c', "until pg_isready -U {{ .Values.postgresql.auth.username }} -d {{ .Values.postgresql.auth.database }} -h {{ .Release.Name }}-postgresql.{{ .Release.Namespace }}.svc.cluster.local; do echo waiting for postgresql; sleep 2; done"]
2-5: Duplicate variable assignment; remove the second $postgrespass.Redundant re-declaration is noisy and risks future drift.
{{- $postgresuser := .Values.postgresql.auth.username }} {{- $postgrespass := .Values.postgresql.auth.password }} -{{- $postgrespass := .Values.postgresql.auth.password }} {{- $releaseName := include "appsmith.fullname" . -}}
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
deploy/helm/tests/__snapshot__/defaults_snapshot_test.yaml.snapis excluded by!**/*.snap
📒 Files selected for processing (2)
deploy/helm/Chart.yaml(1 hunks)deploy/helm/templates/deployment.yaml(3 hunks)
🔇 Additional comments (1)
deploy/helm/Chart.yaml (1)
14-14: Patch version bump looks correct.3.6.4 → 3.6.5 aligns with a template-only fix. No other changes needed here.
Description
Hardcoded image reference was missed in the previous Bitnami image fix.
see: bitnami/charts#35256
Fixes #
Issue Numberor
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags=""
🔍 Cypress test results
Caution
If you modify the content in this section, you are likely to disrupt the CI result for your PR.
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit