From fd44c0fc14527fc90749bc15f9d226409c306c07 Mon Sep 17 00:00:00 2001 From: Eugene Zuev Date: Thu, 22 Dec 2022 12:04:19 +0100 Subject: [PATCH] add volumes and volumeMounts in chartutil add: - volumes in defaultValues - volumes in defaultDeployment - volumeMounts in defaultValues - volumeMounts in defaultDeployment Signed-off-by: Eugene Zuev --- pkg/chartutil/create.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 3a8f3cc5aba..2f07b034a6d 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -180,6 +180,19 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mounthPath: "/etc/foo" +# readOnly: true + nodeSelector: {} tolerations: [] @@ -324,6 +337,14 @@ spec: port: http resources: {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}