diff options
author | Patrick Spek <p.spek@tyil.nl> | 2023-04-04 21:51:59 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-04-04 21:51:59 +0200 |
commit | 418c1933746037b22e7252557fa6f0921d16c667 (patch) | |
tree | cf64ce471aad6b96e7839ac20dd94f5d46a1b9d0 | |
parent | ec25e79c434a072603f3e278fbc266d509ba6d58 (diff) | |
download | k3s-master-418c1933746037b22e7252557fa6f0921d16c667.tar.gz k3s-master-418c1933746037b22e7252557fa6f0921d16c667.tar.bz2 |
Add check for use of a values file in k3s helm apps
-rw-r--r-- | playbook.bash | 9 |
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") } |