summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-08-01 19:39:30 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-08-01 19:39:47 +0200
commitdeeadfcf55299eaffa2048b6afe8cbccaaecd290 (patch)
treeb78d490b61c038d25e881b26f5bd90c410c45df9
parentfd3d64a5a6aeb0978ec1eb5f8d7fcd77143d9e35 (diff)
It appears K3s comes with its own HelmController
-rw-r--r--playbook.bash41
1 files changed, 0 insertions, 41 deletions
diff --git a/playbook.bash b/playbook.bash
index f9ed88d..2d150d1 100644
--- a/playbook.bash
+++ b/playbook.bash
@@ -35,7 +35,6 @@ playbook_add() {
notice "$BASHTARD_PLAYBOOK" "Creating data directories"
mkdir -pv -- "$(playbook_path "data")/manifests.d"
- mkdir -pv -- "$(playbook_path "data")/helm.d"
notice "$BASHTARD_PLAYBOOK" "Waiting for node to become available"
{ grep -q -m 1 "${BASHTARD_PLATFORM[fqdn]}[[:space:]]\+Ready"; kill $!; } < <(k3s kubectl get node -w)
@@ -45,7 +44,6 @@ playbook_add() {
playbook_sync() {
local data
- local helm_cmd
local kubeconfig
local manifest_prefix
local values
@@ -56,45 +54,6 @@ playbook_sync() {
notice "$BASHTARD_PLAYBOOK/manifests" "Applying manifests.d"
kubectl --kubeconfig "$kubeconfig" apply --recursive --filename "$data/manifests.d/$manifest_prefix"
-
- notice "$BASHTARD_PLAYBOOK/helm" "Ensure all Helm repos exist"
- while read -r repo
- do
- helm repo add "$repo" "$(config "$BASHTARD_PLAYBOOK.helm.repos.$repo.url")"
- done < <(config_subkeys "$BASHTARD_PLAYBOOK.helm.repos")
-
- notice "$BASHTARD_PLAYBOOK/helm" "Updating Helm repository contents"
- helm repo update
-
- notice "$BASHTARD_PLAYBOOK/helm" "Upgrading Helm charts"
- while read -r app
- do
- helm_cmd=(
- "helm" "upgrade"
- "--install"
- "--kubeconfig" "$kubeconfig"
- "--timeout" "$(config "$BASHTARD_PLAYBOOK.helm.timeout" "30s")"
- "--namespace" "$(config "$BASHTARD_PLAYBOOK.helm.apps.$app.namespace" "default")"
- )
-
- # Add 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")
- helm_cmd+=("$(config "$BASHTARD_PLAYBOOK.helm.apps.$app.chart")")
-
- notice "$BASHTARD_PLAYBOOK/helm/$app" "> ${helm_cmd[*]}"
- ${helm_cmd[@]} > /dev/null
-
- unset helm_cmd
- unset values
- done < <(config_subkeys "$BASHTARD_PLAYBOOK.helm.apps")
}
playbook_del() {