-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(platform): add etcd config #790
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,10 @@ func (p *Provider) getClusterConfiguration(c *v1.Cluster) *kubeadmv1beta2.Cluste | |
utilruntime.Must(json.Merge(&config.Etcd, &c.Spec.Etcd)) | ||
if config.Etcd.Local != nil { | ||
config.Etcd.Local.ImageTag = images.Get().ETCD.Tag | ||
|
||
if config.Etcd.Local.ExtraArgs != nil && p.config.Etcd.ExtraArgs != nil { | ||
utilruntime.Must(mergo.Merge(&config.Etcd.Local.ExtraArgs, p.config.Etcd.ExtraArgs)) | ||
} | ||
} | ||
|
||
return config | ||
|
@@ -198,9 +202,6 @@ func (p *Provider) getAPIServerExtraArgs(c *v1.Cluster) map[string]string { | |
args["authorization-webhook-config-file"] = constants.KubernetesAuthzWebhookConfigFile | ||
args["authorization-mode"] = "Node,RBAC,Webhook" | ||
} | ||
for k, v := range c.Spec.APIServerExtraArgs { | ||
args[k] = v | ||
} | ||
|
||
utilruntime.Must(mergo.Merge(&args, c.Spec.APIServerExtraArgs)) | ||
utilruntime.Must(mergo.Merge(&args, p.config.APIServer.ExtraArgs)) | ||
|
@@ -215,9 +216,6 @@ func (p *Provider) getControllerManagerExtraArgs(c *v1.Cluster) map[string]strin | |
"cluster-cidr": c.Spec.ClusterCIDR, | ||
"service-cluster-ip-range": c.Status.ServiceCIDR, | ||
} | ||
for k, v := range c.Spec.ControllerManagerExtraArgs { | ||
args[k] = v | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove above lines? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's redundant. the assignment has been done in the next line. |
||
|
||
utilruntime.Must(mergo.Merge(&args, c.Spec.ControllerManagerExtraArgs)) | ||
utilruntime.Must(mergo.Merge(&args, p.config.ControllerManager.ExtraArgs)) | ||
|
@@ -230,9 +228,6 @@ func (p *Provider) getSchedulerExtraArgs(c *v1.Cluster) map[string]string { | |
"use-legacy-policy-config": "true", | ||
"policy-config-file": constants.KuberentesSchedulerPolicyConfigFile, | ||
} | ||
for k, v := range c.Spec.SchedulerExtraArgs { | ||
args[k] = v | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove above lines? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's redundant. the assignment has been done in the next line. |
||
utilruntime.Must(mergo.Merge(&args, c.Spec.SchedulerExtraArgs)) | ||
utilruntime.Must(mergo.Merge(&args, p.config.Scheduler.ExtraArgs)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove above lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's redundant. the assignment has been done in the next line "utilruntime.Must(mergo.Merge(&args, c.Spec.APIServerExtraArgs))"