hivelocity / cluster-api-provider-hivelocity

Kubernetes Cluster API Provider Hivelocity provides a consistent deployment and day 2 operations of "self-managed" Kubernetes clusters on Hivelocity.
https://hivelocity.github.io/cluster-api-provider-hivelocity/user/introduction.html
Apache License 2.0
7 stars 2 forks source link

Add maintenance mode #141

Open guettli opened 8 months ago

guettli commented 8 months ago

/kind feature

Describe the solution you'd like

The cluster admin should have the option to get a machine into the maintenance mode.

If the controller detects that the cluster admin has set maintenance mode, then these steps should happen:

Steps

  1. the machine gets drained
  2. the machine gets deleted.
  3. the machine gets provisioned with the default image.
  4. The HivelocityMachine object gets deleted. But same hv-labels don't get removed. (See below)

Questions

How should the maintenance mode get triggered?

The option "both" sound good, but we need to be sure that the controller can detect the change correctly.

Which labels get removed which should stay?

When a machine gets into maintenance mode these hv-labels should get removed:

These labels stay. I added example values, but of course it is about the key (the part before the equal sign)

These labels will get removed: