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 <mail@torstenwalter.de>
This commit is contained in:
Torsten Walter
2019-04-02 03:18:46 -07:00
committed by Kubernetes Prow Robot
parent 33defe0a80
commit adbda2ca6a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
@@ -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: {}