From adbda2ca6a028709cf8bff0563ece30f3558126d Mon Sep 17 00:00:00 2001 From: Torsten Walter Date: Tue, 2 Apr 2019 12:18:46 +0200 Subject: [PATCH] allow templating of volumes (#12734) Rendering the volumes using the tpl function allows templating within values.yaml If one for example renders a secret or config-map within a chart which has this chart declared as dependency in its `requirements.yaml` then one could inject the rendered secret like this: ``` Persistence: volumes: - name: jenkins-secrets secret: secretName: '{{ template "jenkins.fullname" . }}-casc-secrets' mounts: - mountPath: /run/secrets/casc name: jenkins-secrets readOnly: true ``` Signed-off-by: Torsten Walter --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/templates/jenkins-master-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 66971c0d99..34b3e281cb 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.36.2 +version: 0.36.3 appVersion: lts description: Open source continuous integration server. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based diff --git a/stable/jenkins/templates/jenkins-master-deployment.yaml b/stable/jenkins/templates/jenkins-master-deployment.yaml index f4f17c2950..0e77a08a42 100644 --- a/stable/jenkins/templates/jenkins-master-deployment.yaml +++ b/stable/jenkins/templates/jenkins-master-deployment.yaml @@ -316,7 +316,7 @@ spec: volumes: {{- if .Values.Persistence.volumes }} -{{ toYaml .Values.Persistence.volumes | indent 6 }} +{{ tpl (toYaml .Values.Persistence.volumes | indent 6) . }} {{- end }} - name: plugins emptyDir: {}