fix: delete propagation policy

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-11-01 16:07:04 +08:00
parent 6790844340
commit 228ce54f4f
3 changed files with 10 additions and 15 deletions

View File

@@ -70,7 +70,7 @@ func DeleteNamespace(workspace string, namespaceName string) error {
return err
}
if namespace.Labels[constants.WorkspaceLabelKey] == workspace {
deletePolicy := metav1.DeletePropagationForeground
deletePolicy := metav1.DeletePropagationBackground
return clientset.ClientSets().K8s().Kubernetes().CoreV1().Namespaces().Delete(namespaceName, &metav1.DeleteOptions{PropagationPolicy: &deletePolicy})
} else {
return errors.New("resource not found")