Skip to content

Commit d8b6878

Browse files
mms-build-accountRodrigo Valin
authored andcommitted
Updated: helm_chart/templates/operator.yaml
1 parent 98285a9 commit d8b6878

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

helm_chart/templates/operator.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ spec:
3939
{{- range .Values.operator.watchedResources }}
4040
- "-watch-resource={{ . }}"
4141
{{- end }}
42+
{{- if .Values.multiCluster.clusters }}
43+
- "-watch-resource=mongodbmulti"
44+
- '-cluster-names={{ join "," .Values.multiCluster.clusters }}'
45+
{{- end }}
4246
command:
4347
- "/usr/local/bin/mongodb-enterprise-operator"
4448
{{- end }}
49+
{{- if .Values.multiCluster.clusters }}
50+
volumeMounts:
51+
- mountPath: /etc/config/kubeconfig
52+
name: kube-config-volume
53+
{{- end }}
4554
resources:
4655
limits:
4756
cpu: 1100m
@@ -53,7 +62,7 @@ spec:
5362
- name: OPERATOR_ENV
5463
value: {{ .Values.operator.env }}
5564
- name: WATCH_NAMESPACE
56-
{{- if .Values.operator.watchNamespace}}
65+
{{- if .Values.operator.watchNamespace }}
5766
value: "{{ .Values.operator.watchNamespace }}"
5867
{{- else }}
5968
valueFrom:
@@ -104,7 +113,19 @@ spec:
104113
- name: IMAGE_PULL_SECRETS
105114
value: {{ .Values.registry.imagePullSecrets }}
106115
{{- end }}
107-
116+
{{- if .Values.customEnvVars }}
117+
{{- range split "&" .Values.customEnvVars }}
118+
- name: {{ (split "=" .)._0 }}
119+
value: '{{ (split "=" .)._1 }}'
120+
{{- end }}
121+
{{- end }}
122+
{{- if .Values.multiCluster.clusters }}
123+
volumes:
124+
- name: kube-config-volume
125+
secret:
126+
defaultMode: 420
127+
secretName: {{ .Values.multiCluster.kubeConfigSecretName }}
128+
{{- end }}
108129
{{- if .Values.debug }}
109130
---
110131
apiVersion: v1

0 commit comments

Comments
 (0)