Skip to content

Commit 0cdd8c8

Browse files
davdhacsclaude
andcommitted
Use --set-string for testMode to force string type
Change from --set to --set-string for testMode to ensure it's always a string and has higher precedence over values from GCloud secrets. Update template to use toString filter and string comparison: {{- if or .Values.localDeploy (eq (.Values.testMode | toString) "true") }} This handles the case where GCloud secrets might set testMode to false or null, which would not be properly overridden by --set. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 6dbc7bb commit 0cdd8c8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

chart/infra-server/templates/secrets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ data:
116116
{{ end }}
117117
{{- end }}
118118

119-
{{- if or .Values.localDeploy .Values.testMode }}
119+
{{- if or .Values.localDeploy (eq (.Values.testMode | toString) "true") }}
120120
---
121121
apiVersion: v1
122122
kind: Secret

scripts/deploy/helm.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ deploy() {
9393
fi
9494

9595
# Add dynamic values AFTER --values - so they override GCloud secret values
96+
# Use --set-string for testMode to ensure it overrides any value from GCloud secrets
9697
helm_cmd+=(--set tag="${TAG}")
9798
helm_cmd+=(--set environment="${ENVIRONMENT}")
98-
helm_cmd+=(--set testMode="${TEST_MODE}")
99+
helm_cmd+=(--set-string testMode="${TEST_MODE}")
99100

100101
# Add sessionSecret if provided (for local and test deployments)
101102
if [[ -n "${SESSION_SECRET}" ]]; then

0 commit comments

Comments
 (0)