k8s-charts/charts/unifi-controller/templates/configmap.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 }}