-
Notifications
You must be signed in to change notification settings - Fork 334
Make helm-template script use helmfile #2129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Make the helm-template script use helmfile |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # This script can be used to template a helm chart with values filled in from | ||
| # This script can be used to render all helm charts with values filled in from | ||
| # hack/helm_vars as overrrides, if available. This allows debugging helm | ||
| # templating issues without actually installing anything, and without needing | ||
| # access to a kubernetes cluster | ||
| USAGE="Usage: $0" | ||
|
|
||
| set -e | ||
| # Call the script directly (optionally with `--skip-deps`), or via the | ||
| # `helm-template` make target. | ||
|
|
||
| chart=${1:?$USAGE} | ||
| set -e | ||
|
|
||
| DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| TOP_LEVEL="$DIR/../.." | ||
| CHARTS_DIR="${TOP_LEVEL}/.local/charts" | ||
| : "${FEDERATION_DOMAIN_BASE:=example.com}" | ||
| : "${FEDERATION_DOMAIN:=namespace1.example.com}" | ||
| : "${NAMESPACE:=namespace1}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not familiar with this syntax. Is that the same as ? i.e. set-to-default-if-not-exists? Or this hardcodes/overrides this variable to always be that?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's the same as that.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, thanks for the explanations! |
||
|
|
||
| valuesfile="${DIR}/../helm_vars/${chart}/values.yaml" | ||
| certificatesfile="${DIR}/../helm_vars/${chart}/certificates.yaml" | ||
| declare -a options=() | ||
| if [ -f "$valuesfile" ]; then | ||
| options+=(-f "$valuesfile") | ||
| fi | ||
| if [ -f "$certificatesfile" ]; then | ||
| options+=(-f "$certificatesfile") | ||
| export FEDERATION_DOMAIN_BASE | ||
| export FEDERATION_DOMAIN | ||
| export NAMESPACE | ||
|
|
||
| if [ ! -f "$DIR/../helm_vars/wire-server/certificates-namespace1.yaml" ]; then | ||
| "$DIR/selfsigned-kubernetes.sh" namespace1 | ||
| fi | ||
|
|
||
| "$DIR/update.sh" "$CHARTS_DIR/$chart" | ||
| helm template $"chart" "$CHARTS_DIR/$chart" ${options[*]} | ||
| helmfile -f "$DIR/../helmfile-single.yaml" template "$@" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened to this variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to render a single chart with helmfile.