mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
Delete provisioner deployment deployed by rook
If kube version is == 1.13.x cephfs and rbd provisioner are deployed as statefulset and if kube version is > 1.13.x cephfs and rbd provisioner are deployed as deployment Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
b1efb36b38
commit
d590434374
@ -44,16 +44,26 @@ func removeCephCSIResource() {
|
||||
e2elog.Logf("failed to delete cephfs daemonset %v", err)
|
||||
}
|
||||
|
||||
// cleanup rbd and cephfs statefulset deployed by rook
|
||||
_, err = framework.RunKubectl("delete", "-nrook-ceph", "statefulset", "csi-rbdplugin-provisioner")
|
||||
// if kube version is <1.14.0 rook deploys cephfs and rbd provisioner as statefulset
|
||||
_, err = framework.RunKubectl("delete", "--ignore-not-found", "-nrook-ceph", "statefulset", "csi-rbdplugin-provisioner")
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete rbd statefulset %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "-nrook-ceph", "statefulset", "csi-cephfsplugin-provisioner")
|
||||
_, err = framework.RunKubectl("delete", "--ignore-not-found", "-nrook-ceph", "statefulset", "csi-cephfsplugin-provisioner")
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs statefulset %v", err)
|
||||
}
|
||||
|
||||
// if kube version is >=1.14.0 rook deploys cephfs and rbd provisioner as deployment
|
||||
_, err = framework.RunKubectl("delete", "--ignore-not-found", "-nrook-ceph", "deployment", "csi-rbdplugin-provisioner")
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete rbd deployment %v", err)
|
||||
}
|
||||
_, err = framework.RunKubectl("delete", "--ignore-not-found", "-nrook-ceph", "deployment", "csi-cephfsplugin-provisioner")
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete cephfs deployment %v", err)
|
||||
}
|
||||
|
||||
// cleanup rbd cluster roles deployed by rook
|
||||
rbdPath := fmt.Sprintf("%s/%s/", rbdDirPath, "v1.13")
|
||||
_, err = framework.RunKubectl("delete", "--ignore-not-found", "-f", rbdPath+rbdProvisionerRBAC)
|
||||
|
Loading…
Reference in New Issue
Block a user