Integration with (future) NodeMaintenance API
#9,757 opened on Nov 22, 2023
Repository metrics
- Stars
- (4,267 stars)
- PR merge metrics
- (PR metrics pending)
Description
What would you like to be added (User Story)?
Given that the NodeMaintenance API becomes adopted as a proposed or alpha API:
As a cluster operator, I would like to use to specify node-level maintenance operations. And I would like the cluster API's controllers to take appropriate actions when observing relevant node maintenance objects, so that the workloads I run on my cluster remain available.
Detailed Description
Cluster API develops the ability (eg through Discovery) to detect the existence of a NodeMaintenance API. Maintenance, such as declarative drain events, is accounted for by cluster autoscaling and other controllers.
Anything else you would like to add?
Example: I have a MachineDeployment for each of three physical zones where I run my cluster. A controller I have made myself manages the scale subresource for each MachineDeployment.
Separately, I make a NodeMaintenance that matches topology.kubernetes.io/zone: "antartica-1c"; I'm updating the network configuration in just that one zone. Let's assume that antartica-1a and antartica-1b are the other two zones.
I'd like to be able to observe a condition on the antartica-1c MachineSet, because when all the machines are under maintenance I think a condition is appropriate. I'd also expect to see something .status showing the maintenance. That might be status.readyReplicas as the actual maintenance happens, or another new field.
The outcome should be that my custom controller has enough information to scale out the MachineDeployments in antartica-1a and antartica-1b to cover the expected shortfall, so that there is a home for the replacement Pods as soon as the app-level self healing mechanism kicks in.
This issue is also a call to action; I'd love to see better intergration between CAPI and kubectl drain, etc. NodeMaintenance could be part of that story.
Label(s) to be applied
/kind feature