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. #93

Signed-off-by: Denis Trofimov <[email protected]>
  • Loading branch information
denist-huma authored and leo-ri committed Feb 24, 2022
1 parent 35224ec commit 781203b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions charts/atlas-cluster/templates/atlas-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ metadata:
{{- end }}
spec:
name: {{ .Values.project.atlasProjectName }}
{{- if not .Values.mongodbAtlasOperator.clusterWide }}
{{- with .Values.atlas }}
{{- if .connectionSecretName }}
connectionSecretRef:
name: {{ .connectionSecretName}}
{{- else if and (not .create) .existingSecretName }}
connectionSecretRef:
name: {{ .existingSecretName }}
{{- else if .create }}
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: {{ include "atlas-cluster.fullname" . }}-secret
{{- end }}
{{- end }}
Expand Down

0 comments on commit 781203b

Please sign in to comment.