From e5263e21492118af3579e4a2257903b3983a53f8 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Mon, 2 Dec 2024 21:25:46 -0600 Subject: [PATCH] add ks suspend and resume --- .taskfiles/flux/Taskfile.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.taskfiles/flux/Taskfile.yaml b/.taskfiles/flux/Taskfile.yaml index 2f3768a8..551dd65a 100644 --- a/.taskfiles/flux/Taskfile.yaml +++ b/.taskfiles/flux/Taskfile.yaml @@ -18,6 +18,20 @@ tasks: | xargs -P 4 -L 1 bash -c \ 'kubectl -n $0 annotate kustomization/$1 reconcile.fluxcd.io/requestedAt="$(date +%s)" --field-manager=flux-client-side-apply --overwrite' + ks-suspend: + desc: Suspend all Flux Kustomizations + cmds: + - | + flux get kustomizations --all-namespaces --no-header | awk '{print $1, $2}' \ + | xargs -L 1 bash -c 'flux -n $0 suspend kustomization $1' + + ks-resume: + desc: Resume all Flux Kustomizations + cmds: + - | + flux get kustomizations --all-namespaces --no-header | awk '{print $1, $2}' \ + | xargs -L 1 bash -c 'flux -n $0 resume kustomization $1' + hr-sync: desc: Sync all Flux HelmReleases cmds: