Skip to content

Commit ce97e3b

Browse files
authored
Fix Helm template for AWS credentials secretName (#471)
Issue #, if available: [#1913](aws-controllers-k8s/community#1913) Description of changes: This PR addresses an issue with the Helm template that generates improper YAML when AWS credentials are provided. Removed the hyphen `-` in the conditional check for `.Values.aws.credentials.secretName` in the Helm template. The original template had `{{- if .Values.aws.credentials.secretName -}}`, where the trailing hyphen after the if statement was causing whitespace control issues. This led to improper YAML indentation being generated when `.Values.aws.credentials.secretName` was provided. The corrected template uses `{{- if .Values.aws.credentials.secretName }}` without the trailing hyphen after the conditional, ensuring that the YAML is generated correctly with the right indentation. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 7445de3 commit ce97e3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/helm/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ spec:
151151
hostNetwork: {{ .Values.deployment.hostNetwork }}
152152
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
153153
volumes:
154-
{{- if .Values.aws.credentials.secretName -}}
154+
{{- if .Values.aws.credentials.secretName }}
155155
- name: {{ .Values.aws.credentials.secretName }}
156156
secret:
157157
secretName: {{ .Values.aws.credentials.secretName }}

0 commit comments

Comments
 (0)