This repository was archived by the owner on Aug 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a02d719
commit 271bc0a
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function patch_obj() { | ||
CRD=$1 | ||
NAME=$2 | ||
echo "CRD=$CRD" | ||
echo "NAME=$NAME" | ||
kubectl patch $CRD $NAME -p '{"metadata":{"finalizers":[]}}' --type=merge | ||
} | ||
function patch_all_crd() { | ||
CRD=$1 | ||
echo "CRD to remove $CRD" | ||
kubectl get $CRD -ojson | jq -r ".items[].metadata.name" | while read -r name; do patch_obj $CRD $name; done | ||
|
||
} | ||
|
||
kubectl get crd -ojson | jq -r '.items[].metadata.name' |grep kyma |while read -r line; do patch_all_crd $line ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters