From d08f6a8244f860db80e9580e91864860cf70f406 Mon Sep 17 00:00:00 2001 From: Yuvaraj Kakaraparthi Date: Fri, 20 Jan 2023 15:53:47 -0800 Subject: [PATCH] add comments to disableNodeLabelSync --- internal/controllers/machine/machine_controller.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/controllers/machine/machine_controller.go b/internal/controllers/machine/machine_controller.go index 2ba71f8b7dc5..d10020fa02f9 100644 --- a/internal/controllers/machine/machine_controller.go +++ b/internal/controllers/machine/machine_controller.go @@ -91,7 +91,11 @@ type Reconciler struct { // nodeDeletionRetryTimeout determines how long the controller will retry deleting a node // during a single reconciliation. nodeDeletionRetryTimeout time.Duration - disableNodeLabelSync bool + + // disableNodeLabelSync should only be used for tests. This is used to skip the parts of + // the controller that need SSA as the current test setup does not support SSA. + // This flag should be dropped after the tests are migrated to envtest. + disableNodeLabelSync bool } func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {