From fd44c0fc14527fc90749bc15f9d226409c306c07 Mon Sep 17 00:00:00 2001 From: Eugene Zuev Date: Thu, 22 Dec 2022 12:04:19 +0100 Subject: [PATCH 1/2] 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 3a8f3cc5a..2f07b034a 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 }} From fc1a5a1123793691a0e6f7e339ab49448fc3be77 Mon Sep 17 00:00:00 2001 From: Eugene Zuev Date: Sun, 25 Dec 2022 19:06:28 +0100 Subject: [PATCH 2/2] fix typo: mountPath Signed-off-by: Eugene Zuev --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 2f07b034a..77e1821e9 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -190,7 +190,7 @@ volumes: [] # Additional volumeMounts on the output Deployment definition. volumeMounts: [] # - name: foo -# mounthPath: "/etc/foo" +# mountPath: "/etc/foo" # readOnly: true nodeSelector: {}