Skip to content

Commit

Permalink
fix: Include machinepools in descendent count
Browse files Browse the repository at this point in the history
Without this, machinepool descendeants are ignored in deletion logic and
can be orphaned and unable to delete without manually deleting the
finalizer.
  • Loading branch information
jimmidyson committed Mar 11, 2021
1 parent d0c3bf8 commit 83d2b02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ func (c *clusterDescendants) length() int {
return len(c.machineDeployments.Items) +
len(c.machineSets.Items) +
len(c.controlPlaneMachines.Items) +
len(c.workerMachines.Items)
len(c.workerMachines.Items) +
len(c.machinePools.Items)
}

func (c *clusterDescendants) descendantNames() string {
Expand Down

0 comments on commit 83d2b02

Please sign in to comment.