149 lines
3.0 KiB
YAML
149 lines
3.0 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: unifi
|
|
labels:
|
|
name: unifi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: unifi-controller
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: unifi-controller
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: unifi-controller
|
|
spec:
|
|
containers:
|
|
- name: unifi-controller
|
|
image: linuxserver/unifi-controller
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: PUID
|
|
value: "0"
|
|
- name: PGID
|
|
value: "0"
|
|
ports:
|
|
- name: device-comm
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
- name: stun
|
|
containerPort: 3478
|
|
protocol: UDP
|
|
- name: default-console
|
|
containerPort: 8443
|
|
protocol: TCP
|
|
- name: secure-redirect
|
|
containerPort: 8843
|
|
protocol: TCP
|
|
- name: http-redirect
|
|
containerPort: 8880
|
|
protocol: TCP
|
|
- name: speedtest
|
|
containerPort: 6789
|
|
protocol: TCP
|
|
- name: unifi-disc
|
|
containerPort: 10001
|
|
protocol: UDP
|
|
- name: unifi-disc-l2
|
|
containerPort: 1900
|
|
protocol: UDP
|
|
resources:
|
|
requests:
|
|
cpu: "250m"
|
|
memory: "1024Mi"
|
|
limits:
|
|
cpu: "512m"
|
|
memory: "2048Mi"
|
|
volumeMounts:
|
|
- name: unifi-data
|
|
mountPath: /config
|
|
volumes:
|
|
- name: unifi-data
|
|
persistentVolumeClaim:
|
|
claimName: pvc-unifi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: unifi-controller
|
|
labels:
|
|
app: unifi-controller
|
|
spec:
|
|
selector:
|
|
app: unifi-controller
|
|
ports:
|
|
- name: device-comm
|
|
port: 8080
|
|
protocol: TCP
|
|
- name: stun
|
|
port: 3478
|
|
protocol: UDP
|
|
- name: default-console
|
|
port: 8443
|
|
protocol: TCP
|
|
- name: secure-redirect
|
|
port: 8843
|
|
protocol: TCP
|
|
- name: http-redirect
|
|
port: 8880
|
|
protocol: TCP
|
|
- name: speedtest
|
|
port: 6789
|
|
protocol: TCP
|
|
- name: unifi-disc
|
|
port: 10001
|
|
protocol: UDP
|
|
- name: unifi-disc-l2
|
|
port: 1900
|
|
protocol: UDP
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: ingress-routes-unifi
|
|
namespace: unifi
|
|
annotations:
|
|
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- ui.jsnet.io
|
|
secretName: tls-secret-ui
|
|
rules:
|
|
- host: ui.jsnet.io
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: unifi-controller
|
|
port:
|
|
number: 8443
|
|
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: inform-route-unifi
|
|
namespace: unifi
|
|
spec:
|
|
rules:
|
|
- host: inform-unifi.jsnet.io
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: unifi-controller
|
|
port:
|
|
number: 8080
|