Skip to content

Commit

Permalink
fixup: use ___ instead of --
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert committed Jun 5, 2024
1 parent 24a29ed commit b84c1a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/scripts/strip-kustomize-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# This script is a hack to support helm flow control in kustomize overlays, which would otherwise break them.
# It allows us to render helm template bindings and add newlines.
# For instance, it transforms "__{{ .Value.myValue }}__" to {{ .Value.myValue }}.
# It also adds newlines wherever __newline__ is found.
# For instance, it transforms "___{{ .Value.myValue }}___" to {{ .Value.myValue }}.
# It also adds newlines wherever ___newline___ is found.

CHARTS_DIR='./chart/open-feature-operator/templates';

echo 'Running strip-kustomize-helm.sh script'
filenames=`find $CHARTS_DIR -name "*.yaml"`
for file in $filenames; do
sed -i "s/__newline__/\\n/g" $file
sed -i "s/\"__//g" $file
sed -i "s/__\"//g" $file
sed -i "s/__//g" $file
sed -i "s/___newline___/\\n/g" $file
sed -i "s/\"___//g" $file
sed -i "s/___\"//g" $file
sed -i "s/___//g" $file
done
echo 'Done running strip-kustomize-helm.sh script'
2 changes: 1 addition & 1 deletion config/overlays/helm/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
template:
spec:
# this is transformed by .github/scripts/strip-kustomize-helm.sh
__imagePullSecrets__: "__ __newline__{{ toYaml .Values.imagePullSecrets | indent 8 }}__"
___imagePullSecrets___: "___ ___newline___{{ toYaml .Values.imagePullSecrets | indent 8 }}___"
containers:
- name: manager
image: "{{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag }}"
Expand Down

0 comments on commit b84c1a7

Please sign in to comment.