Fix missing templating to generate initcontainers for mongodb-sharded components (#3211)

Co-authored-by: hightoxicity <tony.fouchard@prevision.io>
This commit is contained in:
Tony Fouchard
2020-07-27 13:07:11 +02:00
committed by GitHub
parent ab3367a104
commit 75b1877e0e
4 changed files with 30 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ spec:
- name: datadir
mountPath: {{ .Values.configsvr.persistence.mountPath }}
{{- end }}
{{- with $.Values.configsvr.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
{{- with $.Values.common.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
containers:
- name: mongodb
image: {{ include "mongodb-sharded.image" . }}

View File

@@ -41,6 +41,15 @@ spec:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
{{- include "mongodb-sharded.imagePullSecrets" . | nindent 6 }}
{{- if or (ge (len $.Values.mongos.initContainers) 1) (ge (len $.Values.common.initContainers) 1) }}
initContainers:
{{- with $.Values.mongos.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
{{- with $.Values.common.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
{{- end }}
containers:
- name: mongos
image: {{ include "mongodb-sharded.image" . }}

View File

@@ -46,6 +46,15 @@ spec:
fsGroup: {{ $.Values.securityContext.fsGroup }}
{{- end }}
{{- include "mongodb-sharded.imagePullSecrets" $ | nindent 6 }}
{{- if or (ge (len $.Values.shardsvr.arbiter.initContainers) 1) (ge (len $.Values.common.initContainers) 1) }}
initContainers:
{{- with $.Values.shardsvr.arbiter.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
{{- with $.Values.common.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
{{- end }}
containers:
- name: {{ include "mongodb-sharded.name" $ }}-arbiter
image: {{ include "mongodb-sharded.image" $ }}

View File

@@ -59,6 +59,12 @@ spec:
- name: datadir
mountPath: {{ $.Values.shardsvr.persistence.mountPath }}
{{- end }}
{{- with $.Values.shardsvr.dataNode.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
{{- with $.Values.common.initContainers }}
{{- include "mongodb-sharded.tplValue" ( dict "value" . "context" $ ) | nindent 8}}
{{- end }}
containers:
- name: mongodb
image: {{ include "mongodb-sharded.image" $ }}