1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2024-12-29 00:10:23 +00:00
ceph-csi/examples/rbd/plugin-teardown.sh

34 lines
669 B
Bash
Raw Normal View History

2018-07-18 14:49:15 +00:00
#!/bin/bash
deployment_base="${1}"
shift
kms_base="${1}"
2018-07-18 14:49:15 +00:00
if [[ -z "${deployment_base}" ]]; then
deployment_base="../../deploy/rbd/kubernetes"
2018-07-18 14:49:15 +00:00
fi
pushd "${deployment_base}" >/dev/null || exit 1
2018-07-18 14:49:15 +00:00
objects=(csi-rbdplugin-provisioner csi-rbdplugin csi-config-map csi-provisioner-rbac csi-nodeplugin-rbac csidriver)
2018-07-18 14:49:15 +00:00
for obj in "${objects[@]}"; do
kubectl delete -f "./${obj}.yaml"
2018-07-18 14:49:15 +00:00
done
popd >/dev/null || exit 1
if [[ -z "${kms_base}" ]]; then
kms_base="../kms/vault"
fi
pushd "${kms_base}" >/dev/null || exit 1
objects=(vault csi-vaulttokenreview-rbac kms-config)
for obj in "${objects[@]}"; do
kubectl delete -f "./${obj}.yaml"
done
popd >/dev/null || exit 1