Cluster-api: Add conditions for MachinePool object

Created on 18 Aug 2020  路  7Comments  路  Source: kubernetes-sigs/cluster-api

Implement https://github.com/kubernetes-sigs/cluster-api/blob/master/docs/proposals/20200506-conditions.md for the MachinePool resource.

Related: #3476

/kind feature

help wanted kinfeature

All 7 comments

/help

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

Please ensure the request meets the requirements listed here.

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

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/assign @srm09

As part of this issue, I was thinking of adding the following conditions:

  • Bootstrap Ready condition which reports the state of the Bootstrap config object
  • Infrastructure Ready condition which reports the state of the Infra config object
  • A new condition which reports the state of the replicas/machines associated to the MachinePool object.

@CecileRobertMichon do these make sense?

cc: @fabriziopandini

Machine pool is an interesting abstraction because from 1 side it has a single infrastructure/bootstrap, from the other side it manages multiple machines.

  • I'm +1 in having BootstrapReady, InfrastructureReady
  • I think we should have MachinesSpecUpToDate & Resized (similar to KCP) to provide an overview of the status of the underlying machines
  • I would be interesting to get a MachineReady condition to provide an overview of the operational state of machines, but I'm not sure if/how this can be achieved

The machinepool controller has the following logic to check if the nodes are available in the reconcileNodeRefs loop.
https://github.com/kubernetes-sigs/cluster-api/blob/73624ed082e948e693a14484549b3db53c1b7ae1/exp/controllers/machinepool_controller_noderef.go#L180-L182

This seems like a place to populate condition data for providing an overview of the operational state of the underlying machines involved.

Sounds good to me. MachinePool should be pretty similar to a Machine in that it's a single infrastructure resource but we can add a new one to track the state of the instances/replicas/nodes. I think we should avoid calling them "Machines" to avoid confusion with Machines in Machine deployments.

Was this page helpful?
0 / 5 - 0 ratings