Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 'kfctl.sh delete platform' doesn't delete platform correctly. #1360

Merged
merged 1 commit into from
Aug 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 18 additions & 20 deletions scripts/kfctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,22 @@ fi
if [ "${COMMAND}" == "delete" ]; then
if [ "${WHAT}" == "k8s" ] || [ "${WHAT}" == "all" ]; then
# Delete kubeflow namespace - this deletes all the ingress objects
# in the namespace which deletes the associated GCP resources
set +e
kubectl delete ns/${K8S_NAMESPACE}
while kubectl get ns/${K8S_NAMESPACE}; do
echo "namespace ${K8S_NAMESPACE} not yet deleted. sleeping 10 seconds..."
sleep 10
done
echo "namespace ${K8S_NAMESPACE} successfully deleted."
set -e


if [ "${WHAT}" == "platform" ] || [ "${WHAT}" == "all" ] ; then
if [ "${PLATFORM}" == "gcp" ]; then
pushd .
cd ${KUBEFLOW_DM_DIR}
${DIR}/gke/delete_deployment.sh ${PROJECT} ${DEPLOYMENT_NAME} ${CONFIG_FILE}
popd
fi
# in the namespace which deletes the associated GCP resources
set +e
kubectl delete ns/${K8S_NAMESPACE}
while kubectl get ns/${K8S_NAMESPACE}; do
echo "namespace ${K8S_NAMESPACE} not yet deleted. sleeping 10 seconds..."
sleep 10
done
echo "namespace ${K8S_NAMESPACE} successfully deleted."
set -e
fi
if [ "${WHAT}" == "platform" ] || [ "${WHAT}" == "all" ] ; then
if [ "${PLATFORM}" == "gcp" ]; then
pushd .
cd ${KUBEFLOW_DM_DIR}
${DIR}/gke/delete_deployment.sh ${PROJECT} ${DEPLOYMENT_NAME} ${CONFIG_FILE}
popd
fi
fi
fi
fi
fi