Skip to content

Implement clusterctl KCP rollout command #6857

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

Closed
tobiasgiese opened this issue Jul 7, 2022 · 4 comments
Closed

Implement clusterctl KCP rollout command #6857

tobiasgiese opened this issue Jul 7, 2022 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@tobiasgiese
Copy link
Member

tobiasgiese commented Jul 7, 2022

User Story

As a user/operator I would like to be able to restart a KubeadmControlPlane rollout for any reason.

Detailed Description

It's possible that an Infra Machine needs to be recreated.
If a high-available (HA) KCP is provisioned, it's possible to delete each machine one after the other.
If a non-HA is provisioned, it's not that easy to re-create the Machine. There is the rolloutAfter field that can trigger a rolling update.

// RolloutAfter is a field to indicate a rollout should be performed
// after the specified time even if no changes have been made to the
// KubeadmControlPlane.
//
// +optional
RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"`

For the machinedeployment there is already a clusterctl alpha rollout restart command implemented. We can easily adapt this for the kubeadmcontrolplane.

Anything else you would like to add:

Not sure if it's feasible to hard-code support for a control plane provider (KCP) into clusterctl, this feature would be very helpful -- at least for us 🙂

I already created a branch for the clusterctl KCP rollout command: https://github.com/mercedes-benz/cluster-api/tree/tobiasgiese/clusterctl-kcp-rollout

/kind feature
Tobias Giese tobias.giese@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, legal info/Impressum

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 7, 2022
@chrischdi
Copy link
Member

maybe duplicate of #3439 ?

@jCOTINEAU
Copy link

Hello, i am also interested in this issue.

Right now we are updating the KubeadmControlPlane PreKubeadmCommands field, adding an envVar like

---
spec:
  kubeadmConfigSpec:
    preKubeadmCommands:
    - export RESTARDED_AT = some_date

As far as i know MachineDeployment can be rolled out by updating an annotation, but not KubeadmControlPlane, which require an update of the specs themselves.

I dont know if adding the same behavior could be a thing, so that we'll be able to add an easy rollout in clusterctl

@tobiasgiese
Copy link
Member Author

maybe duplicate of #3439 ?

Thanks @chrischdi, will close this issue in favor of #3439

As far as i know MachineDeployment can be rolled out by updating an annotation, but not KubeadmControlPlane, which require an update of the specs themselves.

I already implemented the rollout for KCP, I'll create an PR in the next minutes 🙂

@tobiasgiese
Copy link
Member Author

tobiasgiese commented Jul 7, 2022

@jCOTINEAU PR is open

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.
Projects
None yet
Development

No branches or pull requests

4 participants