change kubectl pods' namespace from kubesphere to kubesphere-controls, and ensure delete kubectl-rs when user is deleted

This commit is contained in:
richardxz
2018-06-26 15:48:01 +08:00
parent f1d5ab3a92
commit 7dc16a532a
5 changed files with 29 additions and 11 deletions

View File

@@ -66,11 +66,11 @@ func preCheck() error {
return err
}
for _, ns := range nsList.Items {
if ns.Name == constants.NameSpace {
if ns.Name == constants.KubeSphereControlNameSpace {
return nil
}
}
namespace := v1.Namespace{ObjectMeta: meta_v1.ObjectMeta{Name: constants.NameSpace}}
namespace := v1.Namespace{ObjectMeta: meta_v1.ObjectMeta{Name: constants.KubeSphereControlNameSpace}}
_, err = k8sClient.CoreV1().Namespaces().Create(&namespace)
return err
}