- Use helm upgrade --install for all Helm chart installations.

This change ensures idempotency when managing Helm chart installations by upgrading existing releases or installing them if missing. It improves reliability and prevents errors during repeated script executions. Adjustments were applied consistently across all installation scripts.
This commit is contained in:
Guillaume "B.B." Van Hemmen 2025-03-20 20:59:56 +01:00
parent 735ae5f18d
commit 4fd164620b
4 changed files with 4 additions and 4 deletions

View file

@ -8,4 +8,4 @@ helm repo update
kubectl create namespace metallb-system || true
kubectl label namespace metallb-system pod-security.kubernetes.io/enforce=privileged
helm install metallb metallb/metallb --namespace metallb-system -f ./helm-values/metallb.yaml
helm upgrade --install metallb metallb/metallb --namespace metallb-system -f ./helm-values/metallb.yaml

View file

@ -7,5 +7,5 @@ helm repo update
kubectl create namespace cert-manager || true
helm install cert-manager jetstack/cert-manager --namespace cert-manager -f helm-values/cert-manager.yaml \
helm upgrade --install cert-manager jetstack/cert-manager --namespace cert-manager -f helm-values/cert-manager.yaml \
--set installCRDs=true

View file

@ -20,7 +20,7 @@ helm repo update
kubectl create namespace external-dns || true
# Install the external-dns chart with the provided Cloudflare API token
helm install external-dns bitnami/external-dns --namespace external-dns -f helm-values/external-dns.yaml \
helm upgrade --install external-dns bitnami/external-dns --namespace external-dns -f helm-values/external-dns.yaml \
--set provider=cloudflare \
--set cloudflare.apiToken="$CLOUDFLARE_API_TOKEN" \
--set txtOwnerId=external-dns

View file

@ -46,7 +46,7 @@ kubectl create secret generic longhorn-s3-secret \
--from-literal=AWS_REGION=eu-west-1
# Install the longhorn chart
helm install longhorn longhorn/longhorn \
helm upgrade --install longhorn longhorn/longhorn \
--namespace longhorn-system \
--version 1.7.2 \
-f ./helm-values/longhorn.yaml