Skip to content

Commit

Permalink
Revert "Disable OS updates during xmas (#968)" (#969)
Browse files Browse the repository at this point in the history
This reverts commit 5b41e45.
  • Loading branch information
jknipper authored Jan 6, 2025
1 parent 5b41e45 commit 63c3d39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
22 changes: 10 additions & 12 deletions pkg/controller/servicing/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
4 changes: 1 addition & 3 deletions pkg/controller/servicing/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 63c3d39

Please sign in to comment.