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
|
||||
enabled: true
|
||||
auth:
|
||||
rootUser: root
|
||||
rootPassword: unifi
|
||||
databases:
|
||||
- unifi
|
||||
usernames:
|
||||
- unifi
|
||||
passwords:
|
||||
- unifi
|
||||
initdbScriptsConfigMap: initdb-scripts
|
||||
|
||||
externalMongodb:
|
||||
# -- Use an external MongoDB database
|
||||
|
Loading…
Reference in New Issue
Block a user