Skip to content

Commit 450c93b

Browse files
Allowing imagePullSecrets for community-operator helm chart (#211)
1 parent 68aef2e commit 450c93b

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

charts/community-operator/templates/mongodbcommunity_cr_with_tls.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,8 @@ spec:
7575
{{- end }}
7676
authentication:
7777
modes: ["SCRAM"]
78-
users: []
78+
{{- with .Values.resource.users }}
79+
users:
80+
{{- toYaml . | nindent 4 }}
81+
{{- end }}
7982
{{- end }}

charts/community-operator/templates/operator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ spec:
2222
labels:
2323
name: {{ .Values.operator.name }}
2424
spec:
25+
{{- with .Values.imagePullSecrets }}
26+
imagePullSecrets:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
2529
affinity:
2630
podAntiAffinity:
2731
requiredDuringSchedulingIgnoredDuringExecution:

charts/community-operator/values.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Reference to one or more secrets to be used when pulling images
2+
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
3+
imagePullSecrets: []
4+
# - name: "image-pull-secret"
5+
16
## Operator
27
operator:
38
# Name that will be assigned to most of internal Kubernetes objects like
@@ -85,3 +90,21 @@ resource:
8590
certManager:
8691
certDuration: 8760h # 365 days
8792
renewCertBefore: 720h # 30 days
93+
94+
users: []
95+
# if using the MongoDBCommunity Resource, list any users to be added to the resource
96+
# users:
97+
# - name: my-user
98+
# db: admin
99+
# passwordSecretRef: # a reference to the secret that will be used to generate the user's password
100+
# name: <secretName>
101+
# roles:
102+
# - name: clusterAdmin
103+
# db: admin
104+
# - name: userAdminAnyDatabase
105+
# db: admin
106+
# - name: readWriteAnyDatabase
107+
# db: admin
108+
# - name: dbAdminAnyDatabase
109+
# db: admin
110+
# scramCredentialsSecretName: my-scram

0 commit comments

Comments
 (0)