Skip to content

Commit e5e9cf7

Browse files
committed
Add finalizer removal in cleanup script
1 parent 63e653d commit e5e9cf7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

e2e/scripts/remove_namespaces

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ do
2121
fi
2222

2323
echo "start deleting namespace ${ns}"
24+
for backup in $(kubectl -n ${ns} get fdbbackup --no-headers -o name);
25+
do
26+
echo "Removing finalizer from ${backup} in namespace ${ns}"
27+
kubectl -n ${ns} patch ${backup} -p '{"metadata":{"finalizers":null}}' --type=merge
28+
done
2429

2530
kubectl delete ns --ignore-not-found "${ns}"
2631
) &
@@ -35,4 +40,3 @@ kubectl -n chaos-testing delete iochaos -l "foundationdb.org/user=$USERNAME,foun
3540
kubectl -n chaos-testing delete podchaos -l "foundationdb.org/user=$USERNAME,foundationdb.org/testing=chaos" --wait=false --ignore-not-found
3641
kubectl delete clusterrolebinding -l "foundationdb.org/user=$USERNAME,foundationdb.org/testing=chaos" --wait=false --ignore-not-found
3742
kubectl delete clusterrole -l "foundationdb.org/user=$USERNAME,foundationdb.org/testing=chaos" --wait=false --ignore-not-found
38-
# todo clean up finalizers?

0 commit comments

Comments
 (0)