Skip to content

Commit

Permalink
Merge pull request #5550 from zhzhuang-zju/automated-cherry-pick-of-#…
Browse files Browse the repository at this point in the history
…5546-upstream-release-1.11

Automated cherry pick of #5546: Set Karmada Cert Secret Used For Configurating mTLS for
  • Loading branch information
karmada-bot authored Sep 14, 2024
2 parents c7ae065 + e9ba153 commit 5efee13
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions operator/pkg/controlplane/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,18 @@ func getKarmadaControllerManagerManifest(name, namespace string, featureGates ma

func getKarmadaSchedulerManifest(name, namespace string, featureGates map[string]bool, cfg *operatorv1alpha1.KarmadaScheduler) (*appsv1.Deployment, error) {
karmadaSchedulerBytes, err := util.ParseTemplate(KarmadaSchedulerDeployment, struct {
Replicas *int32
DeploymentName, Namespace, SystemNamespace string
Image, ImagePullPolicy, KubeconfigSecret string
Replicas *int32
DeploymentName, Namespace, SystemNamespace string
Image, ImagePullPolicy, KubeconfigSecret, KarmadaCertsSecret string
}{
DeploymentName: util.KarmadaSchedulerName(name),
Namespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
ImagePullPolicy: string(cfg.ImagePullPolicy),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
Replicas: cfg.Replicas,
DeploymentName: util.KarmadaSchedulerName(name),
Namespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
ImagePullPolicy: string(cfg.ImagePullPolicy),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
KarmadaCertsSecret: util.KarmadaCertSecretName(name),
Replicas: cfg.Replicas,
})
if err != nil {
return nil, fmt.Errorf("error when parsing karmada-scheduler deployment template: %w", err)
Expand All @@ -168,17 +169,18 @@ func getKarmadaSchedulerManifest(name, namespace string, featureGates map[string

func getKarmadaDeschedulerManifest(name, namespace string, featureGates map[string]bool, cfg *operatorv1alpha1.KarmadaDescheduler) (*appsv1.Deployment, error) {
karmadaDeschedulerBytes, err := util.ParseTemplate(KarmadaDeschedulerDeployment, struct {
Replicas *int32
DeploymentName, Namespace, SystemNamespace string
Image, ImagePullPolicy, KubeconfigSecret string
Replicas *int32
DeploymentName, Namespace, SystemNamespace string
Image, ImagePullPolicy, KubeconfigSecret, KarmadaCertsSecret string
}{
DeploymentName: util.KarmadaDeschedulerName(name),
Namespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
ImagePullPolicy: string(cfg.ImagePullPolicy),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
Replicas: cfg.Replicas,
DeploymentName: util.KarmadaDeschedulerName(name),
Namespace: namespace,
SystemNamespace: constants.KarmadaSystemNamespace,
Image: cfg.Image.Name(),
ImagePullPolicy: string(cfg.ImagePullPolicy),
KubeconfigSecret: util.AdminKubeconfigSecretName(name),
KarmadaCertsSecret: util.KarmadaCertSecretName(name),
Replicas: cfg.Replicas,
})
if err != nil {
return nil, fmt.Errorf("error when parsing karmada-descheduler deployment template: %w", err)
Expand Down

0 comments on commit 5efee13

Please sign in to comment.