You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue [#2583](aws-controllers-k8s/community#2583)
Description of changes:
This PR addresses an issue encountered when rendering a Helm chart that includes additional volumes, such as an emptyDir. The change ensures with `-` that leading whitespace is trimmed and using `nindent` instead of `indent` prevents unwanted blank lines. The issue originates from the following pull request #608.
To manually validate the fix of this PR in a chart based on the code-generator follow the steps below:
```
# Pull and extract the ACM chart, which is based on the code-generator:
$ helm pull oci://public.ecr.aws/aws-controllers-k8s/acm-chart --version 1.0.14 && tar -xzf acm-chart-1.0.14.tgz
# Apply the fix from this PR to the chart
$ sed -i '208s|.*| {{- toYaml .Values.deployment.extraVolumes \| nindent 8 }}|' ./acm-chart/templates/deployment.yaml
# Render the chart and verify the output:
$ helm template ./acm-chart --set deployment.extraVolumes[0].name=test --set deployment.extraVolumes[0].emptyDir.sizeLimit=1Mi
# Expected output snippet:
...
hostPID: false
hostNetwork: false
dnsPolicy: ClusterFirst
volumes:
- emptyDir:
sizeLimit: 1Mi
name: test
```
To reproduce the issue with the current version, refer to the steps outlined in the mentioned issue at top.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
0 commit comments