mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
Unsuspend all cozystack charts on start (#429)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
@@ -79,9 +79,13 @@ 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
|
||||
# Unsuspend all Cozystack managed charts
|
||||
kubectl get hr -A -o go-template='{{ range .items }}{{ if .spec.suspend }}{{ .spec.chart.spec.sourceRef.namespace }}/{{ .spec.chart.spec.sourceRef.name }} {{ .metadata.namespace }} {{ .metadata.name }}{{ "\n" }}{{ end }}{{ end }}' | while read repo namespace name; do
|
||||
case "$repo" in
|
||||
cozy-system/cozystack-system|cozy-public/cozystack-extra|cozy-public/cozystack-apps)
|
||||
kubectl patch hr -n "$namespace" "$name" -p '{"spec": {"suspend": null}}' --type=merge --field-manager=flux-client-side-apply
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Reconcile platform chart
|
||||
|
||||
Reference in New Issue
Block a user