-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from mongodb/ent-helm
adding SHA users generation
- Loading branch information
Showing
5 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
charts/ent-operator-database/templates/mongodb-user-password.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- range .Values.users }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ $.Values.name }}-{{ .username }}-secret | ||
namespace: {{ $.Release.Namespace }} | ||
type: Opaque | ||
stringData: | ||
password: {{ .password | quote}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- range .Values.users }} | ||
--- | ||
apiVersion: mongodb.com/v1 | ||
kind: MongoDBUser | ||
metadata: | ||
name: {{ $.Values.name }}-{{ .username }}-mongodbuser | ||
namespace: {{ $.Release.Namespace }} | ||
spec: | ||
passwordSecretKeyRef: | ||
name: {{ $.Values.name }}-{{ .username }}-secret # the name of the secret that stores this user's password | ||
key: password # the key in the secret that stores the password | ||
username: {{ .username }} | ||
db: {{ .db }} | ||
mongodbResourceRef: | ||
name: {{ $.Values.name }} # The name of the MongoDB resource this user will be added to | ||
roles: | ||
{{- toYaml .roles | nindent 6 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters