mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2025-04-24 16:39:52 +00:00
fix mongo init
This commit is contained in:
parent
7587415cda
commit
46e0ea3ef8
10
charts/unifi-controller/templates/configmap.yaml
Normal file
10
charts/unifi-controller/templates/configmap.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{{- 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 }}
|
@ -60,12 +60,15 @@ mongodb:
|
|||||||
# -- Deploy Bitnami MongoDB sub-chart
|
# -- Deploy Bitnami MongoDB sub-chart
|
||||||
enabled: true
|
enabled: true
|
||||||
auth:
|
auth:
|
||||||
|
rootUser: root
|
||||||
|
rootPassword: unifi
|
||||||
databases:
|
databases:
|
||||||
- unifi
|
- unifi
|
||||||
usernames:
|
usernames:
|
||||||
- unifi
|
- unifi
|
||||||
passwords:
|
passwords:
|
||||||
- unifi
|
- unifi
|
||||||
|
initdbScriptsConfigMap: initdb-scripts
|
||||||
|
|
||||||
externalMongodb:
|
externalMongodb:
|
||||||
# -- Use an external MongoDB database
|
# -- Use an external MongoDB database
|
||||||
|
Loading…
Reference in New Issue
Block a user