mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
Unsuspend system helmreleases on cozystack restart (#219)
Developers ofthen forget to unsuspend helm releases after the local development (I do!) This change make ensure that all system helm charts are getting reconciled by flux after cozystack container restart Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ metadata:
|
||||
namespace: {{ $x.namespace }}
|
||||
labels:
|
||||
cozystack.io/repository: system
|
||||
cozystack.io/system-app: "true"
|
||||
spec:
|
||||
interval: 5m
|
||||
releaseName: {{ $x.releaseName | default $x.name }}
|
||||
|
||||
@@ -79,6 +79,11 @@ fi
|
||||
# Reconcile Helm repositories
|
||||
kubectl annotate helmrepositories.source.toolkit.fluxcd.io -A -l cozystack.io/repository reconcile.fluxcd.io/requestedAt=$(date +"%Y-%m-%dT%H:%M:%SZ") --overwrite
|
||||
|
||||
# Unsuspend all system charts
|
||||
kubectl get hr -A -l cozystack.io/system-app=true --no-headers | while read namespace name rest; do
|
||||
kubectl patch hr -n "$namespace" "$name" -p '{"spec": {"suspend": null}}' --type=merge --field-manager=flux-client-side-apply
|
||||
done
|
||||
|
||||
# Reconcile platform chart
|
||||
trap 'exit' INT TERM
|
||||
while true; do
|
||||
|
||||
Reference in New Issue
Block a user