Skip to content

Commit c00db50

Browse files
committed
feat: support container resize policy for runtime resource updates
Add resizePolicy option to allow in-place pod resource updates without restart (beta and enabled by default in Kubernetes 1.33+) Ref: https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/
1 parent 6cf435a commit c00db50

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ spec:
285285
{{- end }}
286286
resources:
287287
{{ toYaml .Values.resources | indent 10 }}
288+
{{- if .Values.resizePolicy }}
289+
resizePolicy:
290+
{{ toYaml .Values.resizePolicy | indent 10 }}
291+
{{- end }}
288292
volumeMounts:
289293
{{- with .Values.config.google }}
290294
{{- if and .adminEmail (or .serviceAccountJson .existingSecret) }}

helm/oauth2-proxy/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ resources:
215215
# cpu: 100m
216216
# memory: 300Mi
217217

218+
# Container resize policy for runtime resource updates
219+
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/
220+
resizePolicy: []
221+
# - resourceName: cpu
222+
# restartPolicy: NotRequired
223+
# - resourceName: memory
224+
# restartPolicy: RestartContainer
225+
218226
extraVolumes:
219227
[]
220228
# - name: ca-bundle-cert

0 commit comments

Comments
 (0)