Skip to content

Commit 77311c0

Browse files
authored
feat: support container resize policy for runtime resource updates (#346)
* 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/ --------- Signed-off-by: younsl <[email protected]>
1 parent 6cf435a commit 77311c0

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 8.1.1
2+
version: 8.2.0
33
apiVersion: v2
44
appVersion: 7.12.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -31,8 +31,8 @@ maintainers:
3131
kubeVersion: ">=1.16.0-0"
3232
annotations:
3333
artifacthub.io/changes: |
34-
- kind: fixed
35-
description: Fixed the Pod Disruption Budget when Horizontal Pod Autoscaling is enabled
34+
- kind: added
35+
description: Add support for new container resize policy feature
3636
links:
3737
- name: Github PR
38-
url: https://github.com/oauth2-proxy/manifests/pull/341
38+
url: https://github.com/oauth2-proxy/manifests/pull/346

helm/oauth2-proxy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart
198198
| `readinessProbe.successThreshold` | number of successes | 1 |
199199
| `replicaCount` | desired number of pods | `1` |
200200
| `resources` | pod resource requests & limits | `{}` |
201+
| `resizePolicy` | Container resize policy for runtime resource updates. See [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) | `[]` |
201202
| `revisionHistoryLimit` | maximum number of revisions maintained | 10 |
202203
| `service.portNumber` | port number for the service | `80` |
203204
| `service.appProtocol` | application protocol on the port of the service | `http` |

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ spec:
285285
{{- end }}
286286
resources:
287287
{{ toYaml .Values.resources | indent 10 }}
288+
{{- with .Values.resizePolicy }}
289+
resizePolicy: {{ toYaml . | nindent 10 }}
290+
{{- end }}
288291
volumeMounts:
289292
{{- with .Values.config.google }}
290293
{{- 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)