Skip to content

Commit

Permalink
refactor: boost manager and friends ready for new types
Browse files Browse the repository at this point in the history
  • Loading branch information
mikouaj committed Dec 20, 2024
1 parent 4ece136 commit 64d0b33
Show file tree
Hide file tree
Showing 17 changed files with 547 additions and 258 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func setupControllers(mgr ctrl.Manager, boostMgr boost.Manager, cfg *config.Conf
Log: ctrl.Log.WithName("boost-reconciler"),
Manager: boostMgr,
}
boostMgr.SetStartupCPUBoostReconciler(boostCtrl)
boostMgr.SetBoostReconciler(boost.RegularBoostTypeName, boostCtrl)
if err := boostCtrl.SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "StartupCPUBoost")
os.Exit(1)
Expand Down
2 changes: 2 additions & 0 deletions internal/boost/boost_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"time"

autoscaling "github.com/google/kube-startup-cpu-boost/api/v1alpha1"
cpuboost "github.com/google/kube-startup-cpu-boost/internal/boost"
bpod "github.com/google/kube-startup-cpu-boost/internal/boost/pod"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -56,6 +57,7 @@ var _ = BeforeSuite(func() {

annotTemplate = &bpod.BoostPodAnnotation{
BoostTimestamp: time.Now(),
BoostType: cpuboost.RegularBoostTypeName,
InitCPURequests: map[string]string{
"container-one": "500m",
"continer-two": "500m",
Expand Down
Loading

0 comments on commit 64d0b33

Please sign in to comment.