From 8d8c3ce014bed03bf909d8dd1126ea48cda10b5a Mon Sep 17 00:00:00 2001 From: Naseem Ullah Date: Sat, 29 Dec 2018 01:32:50 -0500 Subject: [PATCH] Add volumes. rearrange commented values Signed-off-by: Naseem Ullah --- pkg/chartutil/create.go | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 7f82a0667..cb7c62808 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -76,16 +76,24 @@ deployment: targetCPUUtilizationPercentage: 80 targetMemoryUtilizationPercentage: 80 + volumes: [] + # - name: cache-volume + # emptyDir: {} + + volumeMounts: [] + # - name: cache-volume + # mountPath: /cache + podSecurityContext: {} - # runAsUser: 10001 # fsGroup: 2000 + # runAsNonRoot: true + # runAsUser: 10001 containerSecurityContext: {} - # runAsNonRoot: true - # readOnlyRootFilesystem: true # capabilities: # drop: # - ALL + # readOnlyRootFilesystem: true resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -228,6 +236,10 @@ spec: {{- with .Values.deployment.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.deployment.volumes }} + volumes: + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} @@ -249,6 +261,8 @@ spec: {{- toYaml .Values.deployment.resources | nindent 12 }} env: {{- toYaml .Values.deployment.env | nindent 12 }} + volumeMounts: + {{- toYaml .Values.deployment.volumeMounts | nindent 12 }} securityContext: {{- toYaml .Values.deployment.containerSecurityContext | nindent 12 }} {{- with .Values.deployment.nodeSelector }}