Add unifi controller
This commit is contained in:
@@ -1,14 +1,4 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: unifi-mongo-init
|
||||
namespace: unifi
|
||||
data:
|
||||
init-mongo.js: |
|
||||
db.getSiblingDB("unifi").createUser({user: "unifi", pwd: "unifipass", roles: [{role: "dbOwner", db: "unifi"}]});
|
||||
db.getSiblingDB("unifi_stat").createUser({user: "unifi",pwd: "unifipass",roles: [{role: "dbOwner", db: "unifi_stat"}]});
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
@@ -18,7 +8,6 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: unifi-db
|
||||
serviceName: "router-manager-db"
|
||||
replicas: 1
|
||||
minReadySeconds: 10
|
||||
template:
|
||||
@@ -29,20 +18,16 @@ spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: mongodb
|
||||
image: mongo:4
|
||||
image: mongo:8
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
name: mongo
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: unifi-mongo
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data/db
|
||||
- name: unifi-mongo-init
|
||||
mountPath: /docker-entrypoint-initdb.d/init-mongo.js
|
||||
subPath: init-mongo.js
|
||||
volumes:
|
||||
- name: unifi-mongo-init
|
||||
configMap:
|
||||
name: unifi-mongo-init
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
|
Reference in New Issue
Block a user