change kubectl pods' namespace from kubesphere to kubesphere-controls, and ensure delete kubectl-rs when user is deleted
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user