kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.49k stars 1.29k forks source link

Configurable machine replacement #10946

Open Meecr0b opened 1 month ago

Meecr0b commented 1 month ago

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

As a operator i would like to be able to configure a time after machines are getting replaced automatically for testing and security reasons.

Detailed Description

Problem Statement:

Regularly replacing machines help in testing application behavior during rolling updates and ensures machines are refreshed periodically, especially important after security incidents.

Proposed Solution:

Implement rolloutBefore.machineExpiry{Minutes,Hours,Days} parameter within the Cluster API (like rolloutBefore.certificatesExpiryDays implemented for KCP), allowing users to specify the maximum time a machine should exist before being automatically replaced.

Benefits:

Impact:

Anything else you would like to add?

Current workarounds:

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.

sbueringer commented 1 month ago

/triage accepted

/cc @fabriziopandini @chrischdi

fabriziopandini commented 1 month ago

q: is this about replacing nodes (the node at Kubernetes level) or the entire machine where the node is hosted?

Meecr0b commented 1 month ago

Hi @fabriziopandini it's about machines, i'll update the issue.

fabriziopandini commented 1 month ago

ACK, thanks for the clarification We need to think a bit about API modeling, but this is a nice feature to have /help

k8s-ci-robot commented 1 month ago

@fabriziopandini: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api/issues/10946): >ACK, thanks for the clarification >We need to think a bit about API modeling, but this is a nice feature to have >/help Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.