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

Exclude backingStore.etcd's image from getting populated when disabled #2411

Open
wants to merge 1 commit into
base: v0.20
Choose a base branch
from
Open
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
9 changes: 0 additions & 9 deletions config/default_extra_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,10 @@ func applyK8SExtraValues(vConfig *Config, options *ExtraValuesOptions) error {
return err
}

// get etcd image
etcdImage, err := getImageByVersion(options.KubernetesVersion, K8SEtcdVersionMap)
if err != nil {
return err
}

// build values
if apiImage != "" {
vConfig.ControlPlane.Distro.K8S.Version = parseImage(apiImage).Tag
}
if etcdImage != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still need to set the image when the etcd deployment is enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With these changes, the behaviour is now consistent with the latest vcluster (v0.22) when etcd.Deploy is enabled. But I understand the concern, I will check again to be sure and update with more details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lizardruss I have checked and verified about the scenario that you mentioned- when etcd deployment is enabled - in that case it's going to take the default image value present in default values.yaml, as expected.

The reason being, we first get the default helm values (as mentioned above), then we read the values.yaml file provided by the user and merge override only those values which are supplied by the user to create the vcluster config. So, etcd.Deploy will be set to true and the image value will be used from default values.

Below are the test artifacts supporting the above-mentioned facts-

  • Here is the values.yaml file (vc20.yaml) which sets etcd.Deploy.Enabled = true and the etcd pod with the expected image version 3.5.13:
    image

  • Here is the result of helm get values command:
    image

vConfig.ControlPlane.BackingStore.Etcd.Deploy.StatefulSet.Image = parseImage(etcdImage)
}

return nil
}
Expand Down