appuio / component-openshift4-nodes

Commodore Component: OpenShift 4 Machine Management
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Delete machine sets created by the installer #6

Open corvus-ch opened 4 years ago

corvus-ch commented 4 years ago

Context

The installer already creates a MachineSet per availability zone. This MachineSets need to be removed.

This can probably be solved by deploying a job object. The executed container then runs a script (or some other piece of software). The script then uses the API to identify and delete those MachineSets.

One note of warning: an IPI cluster can never have zero worker machines. Before deleting those default MachneSets, we might need to ensure, the new ones are up and running. This might not be need though as pod disruption budgets and other mechanism might prevent deletion of nodes if the workload can not be rescheduled.

Alternatives

Making all the details available, to bring those MachineSets into the cluster catalogue.

mhutter commented 2 years ago

This MachineSets need to be removed

Out of curiosity, can you elaborate why?

corvus-ch commented 2 years ago

This issue was written in the context of GCP and a cluster set up using IPI. The generated MachineSets generate a single node pool (spread across availability zone). Our system reference architecture asks for an infra and app group. A Commodore component can not adopt/overtake resources with non-deterministic names. The solution at that time was, to have the component add the app and infra MachineSets, and have the IPI generated ones removed manually.