Skip to content

Commit 3b38f5d

Browse files
authored
Merge pull request #11487 from chrischdi/pr-machine-hooks-deterministic
🌱 machine: sort list of hooks for stable condition messages
2 parents 17adbb5 + 3bf65b7 commit 3b38f5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/controllers/machine/machine_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ func (r *Reconciler) reconcileDelete(ctx context.Context, s *scope) (ctrl.Result
563563
hooks = append(hooks, key)
564564
}
565565
}
566+
slices.Sort(hooks)
566567
log.Info("Waiting for pre-terminate hooks to succeed", "hooks", strings.Join(hooks, ","))
567568
conditions.MarkFalse(m, clusterv1.PreTerminateDeleteHookSucceededCondition, clusterv1.WaitingExternalHookReason, clusterv1.ConditionSeverityInfo, "")
568569
s.deletingReason = clusterv1.MachineDeletingWaitingForPreTerminateHookV1Beta2Reason

0 commit comments

Comments
 (0)