Fix: Add missing quotes in Helm ConfigMaps to ensure valid YAML and reliable deployments#349
Open
Manas-Dikshit wants to merge 6 commits intoOWASP:developfrom
Open
Fix: Add missing quotes in Helm ConfigMaps to ensure valid YAML and reliable deployments#349Manas-Dikshit wants to merge 6 commits intoOWASP:developfrom
Manas-Dikshit wants to merge 6 commits intoOWASP:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes Helm deployment failures caused by unquoted values in various ConfigMap templates.
Without quotes, YAML rendering could break when values (e.g., passwords, URIs, service URLs) contain special characters like @, :, or /, or when values were misinterpreted as non-strings.
Changes Made
Added | quote filters (and printf "%s:%s" where needed) to ensure all .Values references render as valid string literals.
Files Updated:
deploy/helm/templates/chatbot/config.yaml
deploy/helm/templates/community/config.yaml
deploy/helm/templates/identity/config.yaml
deploy/helm/templates/mailhog/config.yaml
deploy/helm/templates/web/config.yaml
Fixes include:
Quoting database credentials, ports, and URLs.
Properly quoting concatenated service endpoints (service:port) using printf.
Ensuring consistent YAML string rendering across all Helm templates.
Impact
Helm templates now render valid YAML even when credentials or URLs contain special characters.
helm upgrade --install works reliably with custom values.yaml.
No functional logic changes — only template rendering improvements.
Testing
Verified templates render correctly using:
helm template ./deploy/helm -f ./deploy/helm/values.yaml > rendered.yaml
kubectl apply -f rendered.yaml --dry-run=client
Confirmed successful CrAPI deployment on Kubernetes 1.30 / Helm 3.15.
Linked Issue
Fixes #324