mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2024-11-14 10:00:03 +00:00
10 lines
385 B
YAML
10 lines
385 B
YAML
|
{{- if .Values.mongodb.enabled -}}
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: initdb-scripts
|
||
|
data:
|
||
|
init-mongo.js: |
|
||
|
db = db.getSiblingDB("{{ include "unifi-controller.mongodb.database" . }}");
|
||
|
db.grantRolesToUser("{{ include "unifi-controller.mongodb.username" . }}", [{role: "dbOwner", db: "{{ include "unifi-controller.mongodb.database" . }}_stat"}])
|
||
|
{{- end }}
|