Refactor Unifi
This commit is contained in:
parent
d46fa998cb
commit
5486356a4e
4
services/Unifi/_namespace-Unifi.yml
Normal file
4
services/Unifi/_namespace-Unifi.yml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: unifi
|
@ -1,126 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unifi
|
||||
namespace: unifi
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: web
|
||||
port: 8443
|
||||
selector:
|
||||
app: unifi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unifi-tcp
|
||||
namespace: unifi
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: comm
|
||||
port: 8080
|
||||
- protocol: TCP
|
||||
name: bandwidth
|
||||
port: 6789
|
||||
- protocol: TCP
|
||||
name: syslog
|
||||
port: 5514
|
||||
selector:
|
||||
app: unifi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unifi-udp
|
||||
namespace: unifi
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- protocol: UDP
|
||||
name: stun
|
||||
port: 3479
|
||||
- protocol: UDP
|
||||
name: discovery
|
||||
port: 10001
|
||||
selector:
|
||||
app: unifi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: unifi
|
||||
namespace: unifi
|
||||
labels:
|
||||
app: unifi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: unifi
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: unifi
|
||||
spec:
|
||||
containers:
|
||||
- name: unifi
|
||||
image: bv11-cr01.bessems.eu/proxy/linuxserver/unifi-controller
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 8443
|
||||
- name: comm
|
||||
containerPort: 8080
|
||||
- name: bandwidth
|
||||
containerPort: 6789
|
||||
- name: syslog
|
||||
containerPort: 5514
|
||||
- name: stun
|
||||
containerPort: 3479
|
||||
protocol: UDP
|
||||
- name: discovery
|
||||
containerPort: 10001
|
||||
protocol: UDP
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: longhorn-unifi-config
|
||||
volumes:
|
||||
- name: longhorn-unifi-config
|
||||
persistentVolumeClaim:
|
||||
claimName: longhorn-unifi-config
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: unifi
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`wifi.spamasaurus.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: unifi
|
||||
namespace: unifi
|
||||
port: 8443
|
||||
scheme: https
|
||||
# middlewares:
|
||||
# - name: security-headers@file
|
||||
# - name: compression@file
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: longhorn-unifi-config
|
||||
namespace: unifi
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
44
services/Unifi/deployment-Unifi.yml
Normal file
44
services/Unifi/deployment-Unifi.yml
Normal file
@ -0,0 +1,44 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: unifi
|
||||
namespace: unifi
|
||||
labels:
|
||||
app: unifi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: unifi
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: unifi
|
||||
spec:
|
||||
containers:
|
||||
- name: unifi
|
||||
image: bv11-cr01.bessems.eu/proxy/linuxserver/unifi-controller
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 8443
|
||||
- name: comm
|
||||
containerPort: 8080
|
||||
- name: bandwidth
|
||||
containerPort: 6789
|
||||
- name: syslog
|
||||
containerPort: 5514
|
||||
- name: stun
|
||||
containerPort: 3479
|
||||
protocol: UDP
|
||||
- name: discovery
|
||||
containerPort: 10001
|
||||
protocol: UDP
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: longhorn-unifi-config
|
||||
volumes:
|
||||
- name: longhorn-unifi-config
|
||||
persistentVolumeClaim:
|
||||
claimName: longhorn-unifi-config
|
19
services/Unifi/ingressRoute-Unifi.yml
Normal file
19
services/Unifi/ingressRoute-Unifi.yml
Normal file
@ -0,0 +1,19 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: unifi
|
||||
namespace: unifi
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`wifi.spamasaurus.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: unifi
|
||||
namespace: unifi
|
||||
port: 8443
|
||||
scheme: https
|
||||
# middlewares:
|
||||
# - name: security-headers@file
|
||||
# - name: compression@file
|
12
services/Unifi/persistentVolumeClaim-Unifi.yml
Normal file
12
services/Unifi/persistentVolumeClaim-Unifi.yml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: longhorn-unifi-config
|
||||
namespace: unifi
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
49
services/Unifi/service-Unifi.yml
Normal file
49
services/Unifi/service-Unifi.yml
Normal file
@ -0,0 +1,49 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unifi
|
||||
namespace: unifi
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: web
|
||||
port: 8443
|
||||
selector:
|
||||
app: unifi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unifi-tcp
|
||||
namespace: unifi
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: comm
|
||||
port: 8080
|
||||
- protocol: TCP
|
||||
name: bandwidth
|
||||
port: 6789
|
||||
- protocol: TCP
|
||||
name: syslog
|
||||
port: 5514
|
||||
selector:
|
||||
app: unifi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unifi-udp
|
||||
namespace: unifi
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- protocol: UDP
|
||||
name: stun
|
||||
port: 3479
|
||||
- protocol: UDP
|
||||
name: discovery
|
||||
port: 10001
|
||||
selector:
|
||||
app: unifi
|
Loading…
Reference in New Issue
Block a user