Skip to content

Commit

Permalink
feat: Add an option to create AtlasProject without connectionSecretRe…
Browse files Browse the repository at this point in the history
…f in the "atlas-cluster" chart. mongodb#93

Signed-off-by: Denis Trofimov <[email protected]>
  • Loading branch information
denist-huma committed Jan 14, 2022
1 parent 0222017 commit ce2a67a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions charts/atlas-cluster/templates/atlas-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ metadata:
{{- end }}
spec:
name: {{ .Values.project.atlasProjectName }}
{{- with .Values.atlas }}
{{- if .connectionSecretName }}
connectionSecretRef:
{{- if .Values.atlas.connectionSecretName }}
name: {{ .Values.atlas.connectionSecretName}}
{{- else if and (not .Values.atlas.create) .Values.atlas.existingSecretName }}
name: {{ .Values.atlas.existingSecretName }}
{{- else }}
name: {{ .connectionSecretName}}
{{- else if and (not .create) .existingSecretName }}
connectionSecretRef:
name: {{ .existingSecretName }}
{{- else if .create }}
connectionSecretRef:
name: {{ include "atlas-cluster.fullname" . }}-secret
{{- end }}
{{- end }}
projectIpAccessList:
{{- with .Values.project.projectIpAccessList }}
Expand Down

0 comments on commit ce2a67a

Please sign in to comment.