@@ -148,14 +148,19 @@ spec:
148
148
- name : static-site
149
149
mountPath : /usr/share/nginx/html
150
150
{{- end }}
151
- {{- if .Values.config }}
151
+ {{- if or .Values.config .Values.existingConfigConfigmap }}
152
152
- name : nginx-config
153
- mountPath : /etc/nginx/conf.d
153
+ mountPath : /etc/nginx/nginx.conf
154
+ subPath : nginx.conf
154
155
{{- end }}
155
- {{- if or .Values.serverConfig .Values.streamServerConfig }}
156
+ {{- if or .Values.serverConfig .Values.existingServerConfigConfigmap }}
156
157
- name : nginx-server-config
157
158
mountPath : /etc/nginx/conf.d
158
159
{{- end }}
160
+ {{- if or .Values.streamServerConfig .Values.existingStreamServerConfigConfigmap }}
161
+ - name : stream-server-config
162
+ mountPath : /etc/nginx/conf.d
163
+ {{- end }}
159
164
{{- if .Values.extraVolumeMounts }}
160
165
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
161
166
{{- end }}
@@ -220,15 +225,29 @@ spec:
220
225
path : stream-server-config.conf
221
226
{{- end }}
222
227
{{- end }}
223
- {{- if or .Values.serverConfig .Values.streamServerConfig }}
228
+ {{- if or .Values.config .Values.existingConfigConfigmap }}
224
229
- name : nginx-config
225
230
configMap :
226
- name : {{ include "nginx.fullname" . }}
227
- {{- if .Values.serverConfig }}
231
+ name : {{ include "nginx.configConfigmapName" . }}
228
232
items :
229
233
- key : nginx.conf
230
234
path : nginx.conf
231
- {{- end }}
235
+ {{- end }}
236
+ {{- if or .Values.serverConfig .Values.existingServerConfigConfigmap }}
237
+ - name : server-config
238
+ configMap :
239
+ name : {{ include "nginx.serverConfigConfigmapName" . }}
240
+ items :
241
+ - key : server-config.conf
242
+ path : server-config.conf
243
+ {{- end }}
244
+ {{- if or .Values.streamServerConfig .Values.existingStreamServerConfigConfigmap }}
245
+ - name : stream-server-config
246
+ configMap :
247
+ name : {{ include "nginx.streamServerConfigConfigmapName" . }}
248
+ items :
249
+ - key : stream-server-config.conf
250
+ path : stream-server-config.conf
232
251
{{- end }}
233
252
{{- if .Values.extraVolumes }}
234
253
{{- toYaml .Values.extraVolumes | nindent 8 }}
0 commit comments