-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, there is only one deployment, so avoid premature optimization by making these global (and follow the same pattern for imagePullSecrets) Requires more aggressive usage of the `strip-kustomize-helm.sh` script because we have to preserve existing annotations and labels from the config/manager directory. Also update labels and annotations for injected pods (FlagD sidecar, FlagD standalone, and FlagD proxy). Signed-off-by: Christopher Pitstick <[email protected]>
- Loading branch information
1 parent
917a680
commit 210af4a
Showing
14 changed files
with
175 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
# 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. | ||
|
||
CHARTS_DIR='./chart/open-feature-operator/templates'; | ||
# It also adds newlines wherever ___newline___ is found, and other operations. See | ||
# sed_expressions below. | ||
|
||
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 | ||
CHARTS_DIR='./chart/open-feature-operator/templates' | ||
# Careful! Ordering of these expressions matter! | ||
sed_expressions=( | ||
"s/___newline___/\\n/g" | ||
"s/___space___/ /g" | ||
"s/\"___//g" | ||
"s/___\"//g" | ||
"/___delete_me___/d" | ||
"s/___//g" | ||
) | ||
find $CHARTS_DIR -name "*.yaml" | while read file; do | ||
for expr in "${sed_expressions[@]}"; do | ||
sed -i "$expr" "$file" | ||
done | ||
done | ||
echo 'Done running strip-kustomize-helm.sh script' | ||
|
||
echo 'Done running strip-kustomize-helm.sh script' |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.