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 Nov 5, 2024
1 parent c4562f5 commit 96c4dcb
Show file tree
Hide file tree
Showing 18 changed files with 577 additions and 283 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
3 changes: 2 additions & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manager.yaml

images:
- name: controller
newName: ghcr.io/google/kube-startup-cpu-boost
newName: docker.io/library/kube-startup-cpu-boost
newTag: dev
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 96c4dcb

Please sign in to comment.