Skip to content

Commit

Permalink
karmada operator: change karmada system namespace
Browse files Browse the repository at this point in the history
Signed-off-by: calvin <wen.chen@daocloud.io>
  • Loading branch information
calvin committed Sep 19, 2023
1 parent 8d1a800 commit c422952
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions operator/pkg/controlplane/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func getKarmadaControllerManagerManifest(name, namespace string, featureGates ma
}{
DeploymentName: util.KarmadaControllerManagerName(name),
Namespace: namespace,
SystemNamespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
Replicas: cfg.Replicas,
Expand All @@ -128,7 +128,7 @@ func getKarmadaSchedulerManifest(name, namespace string, featureGates map[string
}{
DeploymentName: util.KarmadaSchedulerName(name),
Namespace: namespace,
SystemNamespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
Replicas: cfg.Replicas,
Expand All @@ -155,7 +155,7 @@ func getKarmadaDeschedulerManifest(name, namespace string, featureGates map[stri
}{
DeploymentName: util.KarmadaDeschedulerName(name),
Namespace: namespace,
SystemNamespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
Replicas: cfg.Replicas,
Expand Down
6 changes: 3 additions & 3 deletions operator/pkg/tasks/init/karmadaresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ func runSystemNamespace(r workflow.RunData) error {

err := apiclient.CreateNamespace(data.KarmadaClient(), &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: data.GetNamespace(),
Name: constants.KarmadaSystemNamespace,
},
})
if err != nil {
return fmt.Errorf("failed to create namespace %s, err: %w", data.GetNamespace(), err)
return fmt.Errorf("failed to create namespace %s, err: %w", constants.KarmadaSystemNamespace, err)
}

klog.V(2).InfoS("[systemName] Successfully created karmada system namespace", "namespace", data.GetNamespace(), "karmada", klog.KObj(data))
klog.V(2).InfoS("[systemName] Successfully created karmada system namespace", "namespace", constants.KarmadaSystemNamespace, "karmada", klog.KObj(data))
return nil
}

Expand Down

0 comments on commit c422952

Please sign in to comment.