Skip to content

[question][CA] Why do we need cordon node in Refresh function mcmMananger when CA cordon itsel #350

Description

@name212

What would you like to be added:
N/A
Why is this needed:
N/A

Because the repository does not have an issue with the question type, I will ask my question here.

We have this method in Refresh in mcmManager

func (m *McmManager) Refresh() error {

which goes through all NodeGroups (aka MachineDeployment) gets all nodes from the annotations for deletion and cordons these nodes.
err = ngImpl.mcmManager.cordonNodes(toBeDeletedNodeNames)
At the same time, the autoscaler itself cordons nodes here as well
return AddTaints(node, client, []apiv1.Taint{taint}, cordonNode)

https://github.com/gardener/autoscaler/blob/machine-controller-manager-provider/cluster-autoscaler/core/scaledown/actuation/actuator.go#L382
https://github.com/gardener/autoscaler/blob/machine-controller-manager-provider/cluster-autoscaler/core/scaledown/actuation/actuator.go#L212
https://github.com/gardener/autoscaler/blob/machine-controller-manager-provider/cluster-autoscaler/core/scaledown/actuation/actuator.go#L123

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementEnhancement, improvement, extensionlifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions