@@ -96,33 +96,44 @@ spec:
9696 protocol : {{ default "TCP" $port.protocol }}
9797{{- end }}
9898{{- end }}
99+ {{- if or .Values.deployment.pod.volumeMounts .Values.persistence.enabled .Values.configMaps.enabled .Values.secrets.enabled }}
99100 volumeMounts :
101+ {{- if .Values.deployment.pod.volumeMounts }}
102+ {{- toYaml .Values.deployment.pod.volumeMounts | nindent 8 }}
103+ {{- end }}
100104 {{- if .Values.persistence.enabled }}
101105 - mountPath : {{ .Values.persistence.mountPath | quote }}
102106 name : storage
103107 {{- end }}
104108 {{- include "monochart.files.volumeMounts" . | nindent 8 }}
109+ {{- end }}
105110{{- with .Values.probes }}
106111{{ toYaml . | indent 8 }}
107112{{- end }}
108113{{- with .Values.resources }}
109114 resources :
110115{{ toYaml . | indent 10 }}
111116{{- end }}
112- {{- with .Values.deployment.pod.hostAliases }}
117+ {{- with .Values.deployment.pod.hostAliases }}
113118 hostAliases :
114- {{ toYaml . | indent 8 }}
115- {{- end }}
119+ {{- toYaml . | indent 8 }}
120+ {{- end }}
121+ {{- if or .Values.dockercfg.enabled .Values.image.pullSecrets }}
116122 imagePullSecrets :
117- {{- if .Values.dockercfg.enabled }}
123+ {{- end }}
124+ {{- if .Values.dockercfg.enabled }}
118125 - name : {{ include "common.fullname" . }}
119- {{- end }}
120- {{- with .Values.image.pullSecrets }}
126+ {{- end }}
127+ {{- with .Values.image.pullSecrets }}
121128 {{- range . }}
122129 - name : {{ . }}
123130 {{- end }}
124- {{- end }}
131+ {{- end }}
132+ {{- if or .Values.deployment.volumes .Values.persistence.enabled .Values.configMaps.enabled .Values.secrets.enabled }}
125133 volumes :
134+ {{- if .Values.deployment.volumes }}
135+ {{- toYaml .Values.deployment.volumes | nindent 6 }}
136+ {{- end }}
126137 {{- if .Values.persistence.enabled }}
127138 - name : storage
128139 {{- if .Values.persistence.enabled }}
@@ -133,4 +144,6 @@ spec:
133144 {{- end }}
134145 {{- end }}
135146 {{- include "monochart.files.volumes" . | nindent 6 }}
147+ {{- end }}
148+
136149{{- end -}}
0 commit comments