We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e2cafc commit 0d1efddCopy full SHA for 0d1efdd
pkg/controller/machine_safety.go
@@ -83,9 +83,12 @@ func (c *controller) checkAndFreezeORUnfreezeMachineSets(wg *sync.WaitGroup) {
83
templateLabel := labels.Set(machineSet.Spec.Template.Labels).AsSelectorPreValidated()
84
for _, machine := range filteredMachines {
85
if templateLabel.Matches(labels.Set(machine.Labels)) &&
86
- len(machine.OwnerReferences) >= 1 &&
87
- machine.OwnerReferences[0].Name == machineSet.Name {
88
- fullyLabeledReplicasCount++
+ len(machine.OwnerReferences) >= 1 {
+ for i := range machine.OwnerReferences {
+ if machine.OwnerReferences[i].Name == machineSet.Name {
89
+ fullyLabeledReplicasCount++
90
+ }
91
92
}
93
94
0 commit comments