From 9112848823c4eb681aa56d27377dda7278126bb5 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sat, 9 Mar 2024 11:13:52 -0500 Subject: [PATCH] fix(taskfiles): delete volumesnaphots in volsync cleanup Signed-off-by: Devin Buhl --- .taskfiles/VolSync/Taskfile.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.taskfiles/VolSync/Taskfile.yaml b/.taskfiles/VolSync/Taskfile.yaml index a653326f41387..4c2f227babfea 100644 --- a/.taskfiles/VolSync/Taskfile.yaml +++ b/.taskfiles/VolSync/Taskfile.yaml @@ -162,6 +162,10 @@ tasks: cmd: | {{- $items := (split "/" .ITEM) }} kubectl --context {{.cluster}} delete pvc -n {{ $items._0 }} {{ $items._1 }} + - for: { var: snaps } + cmd: | + {{- $items := (split "/" .ITEM) }} + kubectl --context {{.cluster}} delete volumesnapshot -n {{ $items._0 }} {{ $items._1 }} env: *env requires: vars: ["cluster"] @@ -170,6 +174,8 @@ tasks: sh: kubectl --context {{.cluster}} get pvc --all-namespaces --no-headers | grep "dst-dest" | awk '{print $1 "/" $2}' cache: sh: kubectl --context {{.cluster}} get pvc --all-namespaces --no-headers | grep "dst-cache" | awk '{print $1 "/" $2}' + snaps: + sh: kubectl --context {{.cluster}} get volumesnapshot --all-namespaces --no-headers | grep "dst-dest" | awk '{print $1 "/" $2}' # Suspend the Flux ks and hr .suspend: