-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Community Note
- Please vote on this issue by adding a π reaction
to the original issue to help the community and maintainers prioritize this request - Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do
not help prioritize the request - If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Debug Output
Panic Output
Steps to Reproduce
- Create deployment like this:
and CPUBoost:
apiVersion: apps/v1 kind: Deployment metadata: labels: app: boost-test name: boost-test namespace: boost-test spec: replicas: 4 selector: matchLabels: app: boost-test template: metadata: labels: app: boost-test spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - boost-test topologyKey: kubernetes.io/hostname containers: - image: nginx name: nginx resources: requests: cpu: 100m memory: 20Mi limits: memory: 100Mi livenessProbe: httpGet: port: 80 path: /indexxx.html initialDelaySeconds: 40 periodSeconds: 5 failureThreshold: 3 successThreshold: 1 timeoutSeconds: 2 readinessProbe: httpGet: port: 80 path: /index.html initialDelaySeconds: 20 periodSeconds: 5 failureThreshold: 3 successThreshold: 1 timeoutSeconds: 2apiVersion: autoscaling.x-k8s.io/v1alpha1 kind: StartupCPUBoost metadata: name: boost-cpu namespace: boost-test selector: # matchLabels: {} # matchExpressions: # - key: app # operator: In # values: [ "boost-test" ] matchLabels: app: boost-test spec: resourcePolicy: containerPolicies: - containerName: nginx fixedResources: requests: "900m" durationPolicy: podCondition: type: Ready status: "True" - Observe pod requests:
watch "kubectl get pods -ojson | jq -r '.items[] | .spec.containers[0].resources.requests'"
Expected Behavior
Operator could add resource boosts to pods that were restarted.
Actual Behavior
When pod is restarted app inside goes through initialization and startup again, so it will consume more memory, but this is not reflected in CPU requests/limits, and may end up with starvation.
References
- #0000
etutuit, FredrikAugust, Henrique-Aguiar, mirkoszy, sukolenvo and 1 more
Metadata
Metadata
Assignees
Labels
No labels