diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index b3cca28..6c3df8d 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 6.19.1 +version: 6.20.0 apiVersion: v2 appVersion: 7.5.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -34,8 +34,8 @@ maintainers: kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - - kind: fixed - description: Fix typo for automountServiceAccountToken parameter + - kind: added + description: Allow specifying terminationGracePeriodSeconds and lifecycle hooks links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/173 + url: https://github.com/oauth2-proxy/manifests/pull/174 diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 4a8d32b..a94f1b5 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -73,6 +73,9 @@ spec: {{- toYaml $securityContext | nindent 10 }} {{- end }} {{- end }} + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:v{{ include "oauth2-proxy.version" . }}" @@ -135,6 +138,10 @@ spec: {{- if .Values.htpasswdFile.enabled }} - --htpasswd-file=/etc/oauth2_proxy/htpasswd/users.txt {{- end }} +{{- if .Values.lifecycle }} + lifecycle: +{{ toYaml .Values.lifecycle | indent 10 }} +{{- end }} env: {{- if .Values.proxyVarsAsSecrets }} - name: OAUTH2_PROXY_CLIENT_ID diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 9c3ee0e..361d459 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -349,6 +349,13 @@ redis: # Enables apiVersion deprecation checks checkDeprecation: true +# Allows graceful shutdown +# terminationGracePeriodSeconds: 65 +# lifecycle: +# preStop: +# exec: +# command: [ "sh", "-c", "sleep 60" ] + metrics: # Enable Prometheus metrics endpoint enabled: true