summaryrefslogtreecommitdiff
path: root/playbook.bash
diff options
context:
space:
mode:
Diffstat (limited to 'playbook.bash')
-rw-r--r--playbook.bash9
1 files changed, 8 insertions, 1 deletions
diff --git a/playbook.bash b/playbook.bash
index a2a301b..b01ea1f 100644
--- a/playbook.bash
+++ b/playbook.bash
@@ -45,6 +45,7 @@ playbook_sync() {
local data
local helm_cmd
local kubeconfig
+ local values
data="$(playbook_path "data")"
kubeconfig="$(config "fs.etcdir")/rancher/k3s/k3s.yaml"
@@ -73,7 +74,12 @@ playbook_sync() {
)
# Add values
- helm_cmd+=("--values" "$data/helm.d/$(config "$BASHTARD_PLAYBOOK.helm.apps.$app.values")")
+ values="$(config "$BASHTARD_PLAYBOOK.helm.apps.$app.values" "")"
+
+ if [[ -n "$values" ]]
+ then
+ helm_cmd+=("--values" "$data/helm.d/$values")
+ fi
# Set which chart to upgrade
helm_cmd+=("$app")
@@ -83,6 +89,7 @@ playbook_sync() {
${helm_cmd[@]}
unset helm_cmd
+ unset values
done < <(config_subkeys "$BASHTARD_PLAYBOOK.helm.apps")
}