From f47b2f0369fb4e57749ac12ea87803094c6b8056 Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 3 Feb 2026 17:47:16 +0100 Subject: [PATCH] feat(chart): enable template rendering in extraVolumes and extraVolumeMounts Replace toYaml with common.tplvalues.render for extraVolumes and extraVolumeMounts fields to allow Helm template evaluation within these values. This enables users to reference dynamic values like {{ .Release.Namespace }} or {{ .Release.Name }} in volume configurations. Changes: - deployment.yaml: Updated extraVolumes, extraVolumeMounts, and migrate.extraVolumeMounts - job.yaml: Updated migrate.extraVolumes and migrate.extraVolumeMounts This maintains consistency with other template fields in the chart that already use common.tplvalues.render (e.g., sidecars, probes). --- charts/openfga/templates/deployment.yaml | 6 +++--- charts/openfga/templates/job.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/openfga/templates/deployment.yaml b/charts/openfga/templates/deployment.yaml index 27da0b3..6638584 100644 --- a/charts/openfga/templates/deployment.yaml +++ b/charts/openfga/templates/deployment.yaml @@ -71,7 +71,7 @@ spec: {{- toYaml .Values.datastore.migrations.resources | nindent 12 }} {{- with .Values.migrate.extraVolumeMounts }} volumeMounts: - {{- toYaml . | nindent 12 }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $) | nindent 12 }} {{- end }} {{- if .Values.migrate.sidecars }} {{- include "common.tplvalues.render" ( dict "value" .Values.migrate.sidecars "context" $) | nindent 8 }} @@ -456,7 +456,7 @@ spec: {{- with .Values.extraVolumeMounts }} volumeMounts: - {{- toYaml . | nindent 12 }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $) | nindent 12 }} {{- end }} {{- with .Values.lifecycle }} @@ -470,7 +470,7 @@ spec: {{- with .Values.extraVolumes }} volumes: - {{- toYaml . | nindent 8 }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/openfga/templates/job.yaml b/charts/openfga/templates/job.yaml index fc70228..11d271d 100644 --- a/charts/openfga/templates/job.yaml +++ b/charts/openfga/templates/job.yaml @@ -56,7 +56,7 @@ spec: {{- toYaml .Values.datastore.migrations.resources | nindent 12 }} {{- with .Values.migrate.extraVolumeMounts }} volumeMounts: - {{- toYaml . | nindent 12 }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $) | nindent 12 }} {{- end }} {{- if .Values.migrate.sidecars }} {{- include "common.tplvalues.render" ( dict "value" .Values.migrate.sidecars "context" $) | nindent 8 }} @@ -64,7 +64,7 @@ spec: restartPolicy: Never {{- with .Values.migrate.extraVolumes }} volumes: - {{- toYaml . | nindent 8 }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: