From 323851b0e899a4e1deb27381b9305b1dff108bce Mon Sep 17 00:00:00 2001 From: Jan Knipper Date: Mon, 6 Jan 2025 10:49:07 +0100 Subject: [PATCH] Revert "Disable OS updates during xmas (#968)" This reverts commit 5b41e45222ca3f13e83f9cdbe0c970b751a67449. --- pkg/controller/servicing/controller_test.go | 22 ++++++++++----------- pkg/controller/servicing/reconciler.go | 4 +--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/pkg/controller/servicing/controller_test.go b/pkg/controller/servicing/controller_test.go index c194d8671e..65a876ec08 100644 --- a/pkg/controller/servicing/controller_test.go +++ b/pkg/controller/servicing/controller_test.go @@ -341,19 +341,17 @@ func TestServicingControllerReconcile(t *testing.T) { } _, err := controller.Reconcile(kluster) - /* - if subject.expectedDrain { - mockCycler.AssertCalled(t, "Drain", nodes[0]) - } else { - mockCycler.AssertNotCalled(t, "Drain") - } + if subject.expectedDrain { + mockCycler.AssertCalled(t, "Drain", nodes[0]) + } else { + mockCycler.AssertNotCalled(t, "Drain") + } - if subject.expectedReboot { - mockCycler.AssertCalled(t, "Reboot", nodes[0]) - } else { - mockCycler.AssertNotCalled(t, "Reboot") - } - */ + if subject.expectedReboot { + mockCycler.AssertCalled(t, "Reboot", nodes[0]) + } else { + mockCycler.AssertNotCalled(t, "Reboot") + } if subject.expectedReplace { mockCycler.AssertCalled(t, "Replace", nodes[0]) diff --git a/pkg/controller/servicing/reconciler.go b/pkg/controller/servicing/reconciler.go index e8837efa18..890b1e365f 100644 --- a/pkg/controller/servicing/reconciler.go +++ b/pkg/controller/servicing/reconciler.go @@ -5,7 +5,6 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" - core_v1 "k8s.io/api/core/v1" "k8s.io/client-go/tools/record" "github.com/sapcc/kubernikus/pkg/api/models" @@ -158,8 +157,7 @@ func (r *KlusterReconciler) Do() error { update := r.Lister.Updating() replace := r.Lister.Replace() - // reboot := r.Lister.Reboot() - reboot := make([]*core_v1.Node, 0) // disable reboots for now + reboot := r.Lister.Reboot() // The following block retires already updating nodes if len(update) > 0 {