google / kube-startup-cpu-boost

Kube Startup CPU Boost is a controller that increases CPU resource requests and limits during Kubernetes workload startup time
Apache License 2.0
271 stars 14 forks source link

feat: support running in non-default namespace #20

Closed erikgb closed 9 months ago

erikgb commented 9 months ago

I initially tried to run the operator in another namespace than kube-startup-cpu-boost-system, but this failed because the namespace is hardcoded when supplied to the cert-rotator.

This PR suggests to use the downwardAPI to inject the current namespace as an environment variable to the workload. I have kept the hardcoded namespace name as a default for now.

erikgb commented 9 months ago

@mikouaj, we would prefer if a structured file format for configuring the controller is avoided, as it is impossible to patch with kustomize. The controller config is also deprecated (or about to be) in upstream controller-runtime, ref. https://github.com/kubernetes-sigs/controller-runtime/issues/895. I down-voted https://github.com/google/kube-startup-cpu-boost/issues/2 just now for this reason.