Add unifi controller
This commit is contained in:
@@ -4,5 +4,6 @@ kind: Kustomization
|
||||
namespace: &ns unifi
|
||||
|
||||
resources:
|
||||
- ssh://git@git.k-space.ee/secretspace/kube/unifi # secrets: unifi, unifi-mongo
|
||||
- unifi-mongo.yaml
|
||||
- unifi.yaml
|
||||
|
@@ -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
|
||||
|
@@ -39,16 +39,9 @@ spec:
|
||||
value: '1000'
|
||||
- name: TZ
|
||||
value: Etc/UTC
|
||||
- name: MONGO_USER
|
||||
value: "unifi"
|
||||
- name: MONGO_PASSWORD
|
||||
value: "unifipass"
|
||||
- name: MONGO_HOST
|
||||
value: unifi-db
|
||||
- name: MONGO_DBNAME
|
||||
value: "unifi"
|
||||
- name: MONGO_PORT
|
||||
value: "27017"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: unifi
|
||||
ports:
|
||||
- containerPort: 3478
|
||||
protocol: UDP
|
||||
|
Reference in New Issue
Block a user