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

Updating the dns imageTag causes KCP rolling update #9832

Closed
Levi080513 opened this issue Dec 8, 2023 · 9 comments
Closed

Updating the dns imageTag causes KCP rolling update #9832

Levi080513 opened this issue Dec 8, 2023 · 9 comments
Assignees
Labels
area/provider/control-plane-kubeadm Issues or PRs related to KCP kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Levi080513
Copy link
Contributor

Levi080513 commented Dec 8, 2023

Detailed Description

Currently we can update the coredns version by updating KCP.Spec.KubeadmControlPlaneSpec.kubeadmConfigSpec.clusterConfiguration.DNS.imageTag, but this will cause a rolling update of the control plane nodes.

KCP use the following method to update the coredns version, this does not require rolling updates of control plane nodes, or can we skip checking this field when checking MachinesNeedingRollout?

// Update CoreDNS deployment.
if err := workloadCluster.UpdateCoreDNS(ctx, controlPlane.KCP, parsedVersion); err != nil {
return ctrl.Result{}, errors.Wrap(err, "failed to update CoreDNS deployment")
}

Anything else you would like to add?

No response

Label(s) to be applied

/area provider/control-plane-kubeadm

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 8, 2023
@sbueringer sbueringer added the area/provider/control-plane-kubeadm Issues or PRs related to KCP label Dec 8, 2023
@sbueringer
Copy link
Member

Sounds good to me.

/triage accepted

cc @fabriziopandini in case I'm missing something

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 8, 2023
@sbueringer
Copy link
Member

If I see correctly we can simply set the fields of both to nil before running reflect.DeepEqual:

return reflect.DeepEqual(machineClusterConfig, kcpLocalClusterConfiguration)

@Levi080513
Copy link
Contributor Author

Perhaps it is necessary to synchronize kubeadmConfiguration to avoid configuration differences?

@Levi080513
Copy link
Contributor Author

/assign Levi080513

@sbueringer
Copy link
Member

sbueringer commented Dec 11, 2023

Perhaps it is necessary to synchronize kubeadmConfiguration to avoid configuration differences?

Not as far as I'm aware. The configs won't be identical but the one on the Machine will be still accurately the one the Machine was created with.

@Levi080513
Copy link
Contributor Author

It is my fault I didn't make it clear. I mean do we need to synchronize CP Machinde kubeadmConfig CR and Machine controlplane.cluster.x-k8s.io/kubeadm-cluster-configuration annotation, but now it seems that is not necessary.

@sbueringer
Copy link
Member

sbueringer commented Dec 12, 2023

I think we're fine. But I take a closer look when reviewing the PR

@sbueringer
Copy link
Member

/close

#9857 was merged (no idea why GitHub didn't close the issue automatically, PR description looks correct)

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closing this issue.

In response to this:

/close

#9857 was merged (no idea why GitHub didn't close the issue automatically, PR description looks correct)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/control-plane-kubeadm Issues or PRs related to KCP kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants