Skip to content

Commit

Permalink
feat: Add option to skip user or cluster creation #3
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Trofimov <[email protected]>
  • Loading branch information
denist-huma committed Dec 3, 2021
1 parent dd4d0e2 commit d702fa5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion charts/atlas-cluster/templates/atlas-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- range .Values.clusters }}
{{- with .Values.clusters }}
{{- range . }}
---
apiVersion: atlas.mongodb.com/v1
kind: AtlasCluster
Expand Down Expand Up @@ -75,3 +76,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/atlas-cluster/templates/atlas-mongodb-user-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.project.create }}
{{- range .Values.users }}
{{- with .Values.users }}
{{- range . }}
---
apiVersion: v1
kind: Secret
Expand Down
4 changes: 2 additions & 2 deletions charts/atlas-cluster/templates/atlas-mongodb-user.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.project.create }}
{{- range .Values.users }}
{{- with .Values.users }}
{{- range . }}
---
apiVersion: atlas.mongodb.com/v1
kind: AtlasDatabaseUser
Expand Down
5 changes: 5 additions & 0 deletions charts/atlas-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ project:
- ipAddress: "0.0.0.0/1"
comment: "REMOVE ME"

# Skip clusters creation
# clusters: []
clusters:
- name: cluster-name
annotations: {}
Expand Down Expand Up @@ -57,6 +59,9 @@ clusters:
# pitEnabled: false
# providerBackupEnabled: false
# replicationSpecs:

# Skip users creation
# users: []
users:
- username: admin-user
databaseName: admin
Expand Down

0 comments on commit d702fa5

Please sign in to comment.