Skip to content

Commit

Permalink
Rename hack/clean_crs.sh to hack/clean_crds.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Yang <[email protected]>
  • Loading branch information
yasker committed Nov 13, 2019
1 parent d147d23 commit 450e6e8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hack/cleancrs.sh → hack/cleancrds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -x

namespace=longhorn-system

clean_crs() {
clean_crds() {
crd=$1
kubectl -n $namespace get $crd --no-headers|cut -f1 -d" "| xargs kubectl -n $namespace patch $crd --type='merge' -p '{"metadata":{"finalizers": null}}'
kubectl -n $namespace get $crd --no-headers|cut -f1 -d" "| xargs kubectl -n $namespace patch $crd --type='merge' -p '{"metadata":{"finalizers": null, "ownerReferences":null}}'
kubectl -n $namespace delete $crd --all
kubectl -n $namespace delete crd $crd
}
Expand Down Expand Up @@ -46,7 +46,5 @@ esac

for crd in "${list[@]}"
do
clean_crs $crd
clean_crds $crd
done

#kubectl -n longhorn-system get instancemanagers.longhorn.rancher.io --no-headers|cut -f1 -d" "| xargs kubectl -n longhorn-system patch instancemanagers.longhorn.rancher.io --type='merge' -p '{"metadata":{"finalizers": null}}'

0 comments on commit 450e6e8

Please sign in to comment.