From c00db50a5d2df42489fa5a0d85fc4af361e6c02a Mon Sep 17 00:00:00 2001 From: younsl Date: Sun, 24 Aug 2025 18:46:02 +0900 Subject: [PATCH 1/6] 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/ --- helm/oauth2-proxy/templates/deployment.yaml | 4 ++++ helm/oauth2-proxy/values.yaml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 7982524a..22feff86 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -285,6 +285,10 @@ spec: {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} +{{- if .Values.resizePolicy }} + resizePolicy: +{{ toYaml .Values.resizePolicy | indent 10 }} +{{- end }} volumeMounts: {{- with .Values.config.google }} {{- if and .adminEmail (or .serviceAccountJson .existingSecret) }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 87f54152..272b50c9 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -215,6 +215,14 @@ resources: # cpu: 100m # memory: 300Mi +# Container resize policy for runtime resource updates +# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/ +resizePolicy: [] + # - resourceName: cpu + # restartPolicy: NotRequired + # - resourceName: memory + # restartPolicy: RestartContainer + extraVolumes: [] # - name: ca-bundle-cert From e6b0382ef9b879bb426deb48be54e2daef848c5a Mon Sep 17 00:00:00 2001 From: younsl Date: Sun, 24 Aug 2025 18:49:38 +0900 Subject: [PATCH 2/6] docs: Add resizePolicy value in README Signed-off-by: younsl --- helm/oauth2-proxy/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 7532b79b..fe13f75e 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -198,6 +198,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart | `readinessProbe.successThreshold` | number of successes | 1 | | `replicaCount` | desired number of pods | `1` | | `resources` | pod resource requests & limits | `{}` | +| `resizePolicy` | Container resize policy for runtime resource updates. See [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) | `[]` | | `revisionHistoryLimit` | maximum number of revisions maintained | 10 | | `service.portNumber` | port number for the service | `80` | | `service.appProtocol` | application protocol on the port of the service | `http` | From 3b92c1ff25f41b70deb5ab9d5e2f14b6549b369e Mon Sep 17 00:00:00 2001 From: younsl Date: Sun, 24 Aug 2025 18:50:09 +0900 Subject: [PATCH 3/6] chore: Bump chart minor version from 8.1.1 to 8.2.1 Signed-off-by: younsl --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 9be1fd7f..f1cbebb3 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 8.1.1 +version: 8.2.1 apiVersion: v2 appVersion: 7.12.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ From dc65a09fb45c7ca03fd925eeccf53327b97c52f2 Mon Sep 17 00:00:00 2001 From: younsl Date: Sun, 24 Aug 2025 22:08:16 +0900 Subject: [PATCH 4/6] fix: Wrong chart version bump * Added missing changelog * https://github.com/oauth2-proxy/manifests/pull/346\#discussion_r2296651130 Signed-off-by: younsl --- helm/oauth2-proxy/Chart.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index f1cbebb3..5142e7f6 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 8.2.1 +version: 8.2.0 apiVersion: v2 appVersion: 7.12.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -31,8 +31,8 @@ maintainers: kubeVersion: ">=1.16.0-0" annotations: artifacthub.io/changes: | - - kind: fixed - description: Fixed the Pod Disruption Budget when Horizontal Pod Autoscaling is enabled + - kind: added + description: Add support for new container resize policy feature links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/341 + url: https://github.com/oauth2-proxy/manifests/pull/346 From d57cc9d3fab0645efc8b195c74cd5452c062f2d0 Mon Sep 17 00:00:00 2001 From: younsl Date: Sun, 24 Aug 2025 22:10:06 +0900 Subject: [PATCH 5/6] chore: Replace if into with function Signed-off-by: younsl --- helm/oauth2-proxy/templates/deployment.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 22feff86..aae00df5 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -285,9 +285,8 @@ spec: {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} -{{- if .Values.resizePolicy }} - resizePolicy: -{{ toYaml .Values.resizePolicy | indent 10 }} +{{- with .Values.resizePolicy }} + resizePolicy: {{ toYaml . | nindent 10 }} {{- end }} volumeMounts: {{- with .Values.config.google }} From 67954ca0ed191d79bf7cc5f6f79b4f2529cee71f Mon Sep 17 00:00:00 2001 From: younsl Date: Sun, 24 Aug 2025 22:11:22 +0900 Subject: [PATCH 6/6] fix: Lint empty space EOL Signed-off-by: younsl --- helm/oauth2-proxy/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 5142e7f6..4e7ae543 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -31,8 +31,8 @@ maintainers: kubeVersion: ">=1.16.0-0" annotations: artifacthub.io/changes: | - - kind: added - description: Add support for new container resize policy feature + - kind: added + description: Add support for new container resize policy feature links: - name: Github PR url: https://github.com/oauth2-proxy/manifests/pull/346