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

Rollout updates to cluster config the same as for upgrades #11837

Open
Xartos opened this issue Feb 13, 2025 · 6 comments
Open

Rollout updates to cluster config the same as for upgrades #11837

Xartos opened this issue Feb 13, 2025 · 6 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@Xartos
Copy link

Xartos commented Feb 13, 2025

What would you like to be added (User Story)?

As an operator I would like a cluster using topology to do rolling updates one machine deployment at a time when I update configuration of the cluster.

Detailed Description

When operating a cluster that is setup using the clusterclass/topology feature it very nicely updates one machine deployment at a time when doing kubernetes upgrades.
However when changing configuration of the nodes it will do a rollout of every machine deployment in parallel.

It would be nice if you could configure the topology controller to have the same rollout method for configuration changes as with kubernetes upgrades.

Anything else you would like to add?

It would also be very nice if you could add some more complex strategies. Like that you can tell the controller to do some machine deployments in serial and some in parallel.
As an example: If you have 3 machine deployments (in separate zones) for a db and 3 for applications. All the db nodes should be done in serial and all the application nodes in serial. But the groups could be done in parallel.

But this feels like a streched goal, maybe it merits its own feature request issue?

Label(s) to be applied

/kind feature
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 13, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If CAPI contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

@chrischdi
Copy link
Member

chrischdi commented Feb 13, 2025

We have the following two annotations:

topology.cluster.x-k8s.io/hold-upgrade-sequence

  • It can be used to hold the entire MachineDeployment upgrade sequence. If the annotation is set on a MachineDeployment topology in Cluster.spec.topology.workers, the Kubernetes upgrade for this MachineDeployment topology and all subsequent ones is deferred.

topology.cluster.x-k8s.io/upgrade-concurrency

  • It can be used to configure the maximum concurrency while upgrading MachineDeployments of a classy Cluster. It is set as a top level annotation on the Cluster object. The value should be >= 1. If unspecified the upgrade concurrency will default to 1.

Did you consider if these fit your requirements?

Link to the docs: https://main.cluster-api.sigs.k8s.io/reference/api/labels-and-annotations.html?highlight=annotations#supported-annotations

@Xartos
Copy link
Author

Xartos commented Feb 18, 2025

But those annotations are only for the upgrade procedure right? i.e. when you upgrade kubernetes. Because I think that that flow works perfectly.

The issue I'm having is if I change anything else on the kubeadmconfigtemplates, let's say I'm changing SSH-keys for the nodes. Then I'd like the same behavior as for when upgrading kubernetes. And not need to manually pause each machine deployment and unpause them one by one.

@chrischdi
Copy link
Member

Yes, I think you're right, its only used when actually upgrading, not for other fields 🤔

@chrischdi
Copy link
Member

Note for:

It would also be very nice if you could add some more complex strategies. Like that you can tell the controller to do some machine deployments in serial and some in parallel.
As an example: If you have 3 machine deployments (in separate zones) for a db and 3 for applications. All the db nodes should be done in serial and all the application nodes in serial. But the groups could be done in parallel.

This can already be done today when using PodDisruptionBudgtes on the workload side.

@fabriziopandini
Copy link
Member

My hot take:

  • the idea of having some control on any update - and not only on upgrades - seems an interesting use case to look at.
  • figuring out what this entails and a better UX - possibly not based on annotations - requires some research e.g.
    • we specifically added infos to various CR in order to track upgrade progress, I'm not sure we have a similar signal for any upgdate progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

4 participants