mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 14:30:12 +01:00
29 lines
655 B
Bash
29 lines
655 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
kubectl get zfsvolumes.openebs.io -n openebs -oyaml > volumes.yaml
|
||
|
|
|
||
|
|
# remove the finalizer from the old CR
|
||
|
|
sed -i "/zfs.openebs.io\/finalizer/d" volumes.yaml
|
||
|
|
kubectl apply -f volumes.yaml
|
||
|
|
|
||
|
|
# delete the old CR
|
||
|
|
kubectl delete -f volumes.yaml
|
||
|
|
|
||
|
|
# delete the CRD definition
|
||
|
|
kubectl delete crd zfsvolumes.openebs.io
|
||
|
|
|
||
|
|
|
||
|
|
kubectl get zfssnapshots.openebs.io -n openebs -oyaml > snapshots.yaml
|
||
|
|
|
||
|
|
# remove the finalizer from the old CR
|
||
|
|
sed -i "/zfs.openebs.io\/finalizer/d" snapshots.yaml
|
||
|
|
kubectl apply -f snapshots.yaml
|
||
|
|
|
||
|
|
# delete the old CR
|
||
|
|
kubectl delete -f snapshots.yaml
|
||
|
|
|
||
|
|
# delete the CRD definition
|
||
|
|
kubectl delete crd zfssnapshots.openebs.io
|