💥 add all the files
This commit is contained in:
@@ -0,0 +1,62 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: unifi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: unifi-db
|
||||||
|
namespace: unifi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: unifi-db
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: unifi-db
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: docker.io/mongo
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: mongo
|
||||||
|
command:
|
||||||
|
- "mongod"
|
||||||
|
- "--bind_ip"
|
||||||
|
- "0.0.0.0"
|
||||||
|
volumeMounts:
|
||||||
|
- name: unifi-db-config
|
||||||
|
mountPath: /data/db
|
||||||
|
- name: unifi-db-init
|
||||||
|
mountPath: /docker-entrypoint-initdb.d/init-mongo.js
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
protocol: TCP
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
- name: unifi-db-config
|
||||||
|
hostPath:
|
||||||
|
path: /opt/kubernetes/Unifi_kube/data/unifi_ui/
|
||||||
|
- name: unifi-db-init
|
||||||
|
hostPath:
|
||||||
|
path: /opt/kubernetes/Unifi_kube/data/unifi_db/init-mongo.js
|
||||||
|
type: File
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: unifi-db
|
||||||
|
namespace: unifi
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: unifi-db
|
||||||
|
port: 27017
|
||||||
|
targetPort: 27017
|
||||||
|
protocol: TCP
|
||||||
|
# nodePort: 31039
|
||||||
|
type: ClusterIP
|
||||||
|
# type: NodePort
|
||||||
|
selector:
|
||||||
|
app: unifi-db
|
||||||
+113
@@ -0,0 +1,113 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: unifi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: unifi
|
||||||
|
namespace: unifi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: unifi
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: unifi
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: lscr.io/linuxserver/unifi-network-application:8.1.113-ls36
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: unifi
|
||||||
|
env:
|
||||||
|
- name: PUID
|
||||||
|
value: "1000"
|
||||||
|
- name: PGID
|
||||||
|
value: "1000"
|
||||||
|
- name: TZ
|
||||||
|
value: "Etc/UTC"
|
||||||
|
- name: MEM_LIMIT
|
||||||
|
value: "1024"
|
||||||
|
- name: MEM_STARTUP
|
||||||
|
value: "1024"
|
||||||
|
- name: MONGO_USER
|
||||||
|
value: "UNIFI_USER"
|
||||||
|
- name: MONGO_PASS
|
||||||
|
value: "Unrushed-Tubby-Gutter-Dingo9-Mobilize"
|
||||||
|
- name: MONGO_HOST
|
||||||
|
value: "unifi-db.unifi"
|
||||||
|
- name: MONGO_PORT
|
||||||
|
value: "27017"
|
||||||
|
- name: MONGO_DBNAME
|
||||||
|
value: "UNIFI_DB"
|
||||||
|
- name: MONGO_TLS
|
||||||
|
value: #optional
|
||||||
|
- name: MONGO_AUTHSOURCE
|
||||||
|
value: #optional
|
||||||
|
volumeMounts:
|
||||||
|
- name: unifi-ui-config
|
||||||
|
mountPath: /config
|
||||||
|
ports:
|
||||||
|
- containerPort: 8443
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 3478
|
||||||
|
protocol: UDP
|
||||||
|
- containerPort: 10001
|
||||||
|
protocol: UDP
|
||||||
|
- containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
|
||||||
|
# - image: docker.io/mongo
|
||||||
|
# imagePullPolicy: IfNotPresent
|
||||||
|
# name: mongo
|
||||||
|
# volumeMounts:
|
||||||
|
# - name: unifi-db-config
|
||||||
|
# mountPath: /data/db
|
||||||
|
# - name: unifi-db-init
|
||||||
|
# mountPath: /docker-entrypoint-initdb.d/init-mongo.js
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: unifi-ui-config
|
||||||
|
hostPath:
|
||||||
|
path: /opt/kubernetes/Unifi_kube/data/unifi_db/
|
||||||
|
- name: unifi-db-config
|
||||||
|
hostPath:
|
||||||
|
path: /opt/kubernetes/Unifi_kube/data/unifi_ui/
|
||||||
|
- name: unifi-db-init
|
||||||
|
hostPath:
|
||||||
|
path: /opt/kubernetes/Unifi_kube/data/unifi_db/init-mongo.js
|
||||||
|
type: File
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: unifi
|
||||||
|
namespace: unifi
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: unifi-stun
|
||||||
|
port: 3478
|
||||||
|
protocol: UDP
|
||||||
|
nodePort: 31040
|
||||||
|
|
||||||
|
- name: ap-discovery
|
||||||
|
port: 10001
|
||||||
|
protocol: UDP
|
||||||
|
nodePort: 31041
|
||||||
|
|
||||||
|
- name: device-com
|
||||||
|
port: 8080
|
||||||
|
protocol: TCP
|
||||||
|
nodePort: 31042
|
||||||
|
|
||||||
|
- name: unifi-web
|
||||||
|
port: 8443
|
||||||
|
protocol: TCP
|
||||||
|
nodePort: 31043
|
||||||
|
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: unifi
|
||||||
Reference in New Issue
Block a user