Files
Unifi_kube/unifi.kube.yaml
T
2024-06-19 13:51:39 +01:00

114 lines
2.5 KiB
YAML

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