Skip to content
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

[BACKPORT v0.20] fix: set controlPlane.distro.k8s.version by default #2062

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions config/default_extra_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,6 @@ func applyK8SExtraValues(vConfig *Config, options *ExtraValuesOptions) error {
return err
}

// get controller image
controllerImage, err := getImageByVersion(options.KubernetesVersion, K8SControllerVersionMap)
if err != nil {
return err
}

// get scheduler image
schedulerImage, err := getImageByVersion(options.KubernetesVersion, K8SSchedulerVersionMap)
if err != nil {
return err
}

// get etcd image
etcdImage, err := getImageByVersion(options.KubernetesVersion, K8SEtcdVersionMap)
if err != nil {
Expand All @@ -194,13 +182,7 @@ func applyK8SExtraValues(vConfig *Config, options *ExtraValuesOptions) error {

// build values
if apiImage != "" {
vConfig.ControlPlane.Distro.K8S.APIServer.Image = parseImage(apiImage)
}
if controllerImage != "" {
vConfig.ControlPlane.Distro.K8S.ControllerManager.Image = parseImage(controllerImage)
}
if schedulerImage != "" {
vConfig.ControlPlane.Distro.K8S.Scheduler.Image = parseImage(schedulerImage)
vConfig.ControlPlane.Distro.K8S.Version = parseImage(apiImage).Tag
}
if etcdImage != "" {
vConfig.ControlPlane.BackingStore.Etcd.Deploy.StatefulSet.Image = parseImage(etcdImage)
Expand Down
Loading