From d1be81afcb81981b77c3d7dd4665c7a6c19b1a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Wo=C5=82och?= Date: Tue, 24 Mar 2026 08:28:26 +0100 Subject: [PATCH] feat: support templating in extraInitContainers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable Helm template expressions in extraInitContainers by wrapping toYaml output with tpl function, allowing dynamic values from release metadata, config maps, and secrets. Signed-off-by: Józef Wołoch --- helm/oauth2-proxy/Chart.yaml | 8 ++++---- helm/oauth2-proxy/templates/deployment.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index bc800656..d202e364 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 10.2.0 +version: 10.2.1 apiVersion: v2 appVersion: 7.15.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -30,8 +30,8 @@ maintainers: kubeVersion: ">=1.16.0-0" annotations: artifacthub.io/changes: | - - kind: added - description: feat: full support for ParentRef fields of gateway-api HTTPRoutes + - kind: changed + description: feat: support templating in extraInitContainers links: - name: GitHub PR - url: https://github.com/oauth2-proxy/manifests/pull/391 + url: https://github.com/oauth2-proxy/manifests/pull/399 diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index f5f5b4dd..1e3cffcf 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -69,7 +69,7 @@ spec: {{- if or (and $redisEnabled .Values.initContainers.waitForRedis.enabled) .Values.extraInitContainers }} initContainers: {{- if .Values.extraInitContainers }} - {{- toYaml .Values.extraInitContainers | nindent 6 }} + {{- tpl (toYaml .Values.extraInitContainers) . | nindent 6 }} {{- end }} {{- if and $redisEnabled .Values.initContainers.waitForRedis.enabled }} - name: wait-for-redis