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
286 stars 14 forks source link

Applying policy to existing helm releases #54

Closed falken01 closed 4 months ago

falken01 commented 4 months ago

Issues on GitHub are intended to be related to bugs or feature requests with provider codebase, so we recommend using our other community resources instead of asking here 👍.


Hello,

My question is if that feature works only for newly created pods? Unfortunately for me after creating a new release with helm the pod runs into error with following information in logs:

"error":"pod resources reversion failed: Pod \"[pod's name]" is invalid: spec: Forbidden: pod updates may not change fields other thanspec.containers[].image,spec.initContainers[].image,spec.activeDeadlineSeconds,spec.tolerations(only additions to existing tolerations) (...)

To reproduce:

  1. Installation: kubectl apply -f https://github.com/google/kube-startup-cpu-boost/releases/download/v0.9.0/manifests.yaml
  2. Creating object within my namespace with proper values
  3. Recreating pods with command: helm upgrade --namespace xxx --install --values (...)

I ask that question bcs every example I found uses kubectl commands where pods are entirely deleted. But I havent found example with helm

mikouaj commented 4 months ago

Hi @falken01, thank you for rising this. The error message says that the controller is not able to revert the POD CPU resources to the original values. The reason of that is most likely that your cluster has no InPlacePodVerticalScaling feature gate enabled. This feature makes Pod resource requirements mutable and is a pre-requisite for Kube Startup CPU Boost. Can you please verify this?

falken01 commented 4 months ago

You;re right i havent read docs carefully enought. Thanks