Skip to content

Commit d1a8652

Browse files
committed
ADD: Unifi Controller / ArgoCD / Helm Version
1 parent b60f2cd commit d1a8652

File tree

4 files changed

+191
-2
lines changed

4 files changed

+191
-2
lines changed

_extra_apps/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ Each Application uses this directory structure:
3232
* [Custom-Alerts](./custom-alerts/) - Alerts for Prometheus Operator Alertmanager for:
3333
* Node Hardware, ArgoCD Sync Issues, Traefik Ingress Error codes
3434
* [Goldilocks](./goldilocks/) - Uses [Vertical Pod Autoscaler (VPA)](./vpa/) to make recommendations on container limit and request recommendations, includes a dashboard.
35-
* [Mosquitto](./mosquitto/) [Kustomize Based] - Eclipse Mosquitto is a lightweight MQTT Message Broker
35+
* [Mosquitto](./mosquitto/) [Kustomize Based] - Eclipse Mosquitto is a lightweight MQTT Message Broker
3636
* [Mosquitto](./mosquitto-exporter-argocd-helm/) [ArgoCD Helm Application Based] - Eclipse Mosquitto lightweight MQTT Message Broker
3737
* [Mosquitto-Exporter](./mosquitto-exporter/) - Exposes Mosquitto MQTT Broker Metrics as Prometheus Service Monitor
38-
* [Unifi Controller](./unifi-controller/) - Wireless Network Management Software from Ubiquiti
38+
* [Unifi Controller](./unifi-controller/) [Kustomize Based] -Wireless Network Management Software from Ubiquiti
39+
* [Unifi Controller](./unifi-controller-argocd-helm/) [ArgoCD Helm Application Based] - Wireless Network Management Software from Ubiquiti
3940
* [Unpoller-Exporter](./unpoller-exporter/) - Exposes [Unifi Controller](./unifi-controller/) Management Software Metrics as Prometheus Pod Monitor
4041
* [Vertical Pod Autoscaler (VPA)](./vpa/) - Enables ability to make container resource limit and request recommendations, used with [Goldilocks](./goldilocks/)
4142
* [Zigbee2MQTT](./zigbee2mqtt-argocd-helm/) - A Zigbee to MQTT ([Mosquitto](./mosquitto/)) Bridge
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Unifi Controller Wireless Network Management Software from Ubiquiti
2+
3+
* Be sure to export a backup from your existing installation. You will be able to import that backup into this installation.
4+
5+
[Return to Application List](../)
6+
7+
* Helm based ArgoCD application deployment
8+
* References a Kubernetes at Home Chart
9+
* Much simpler to configure than the Kustomize version
10+
* Uses 10 GiB Persistent Volume Storage
11+
12+
Review file `unifi-controller-argocd-helm/applications/unifi.yaml`
13+
14+
* Define the ArgoCD project to assign this application to
15+
* ArgoCD uses `default` project by default
16+
17+
```yaml
18+
spec:
19+
project: default
20+
```
21+
22+
* Define Time Zone to use
23+
24+
```yaml
25+
env:
26+
TZ: "America/New York"
27+
```
28+
29+
* Define Ingress Name, below uses "unifi.example.com"
30+
31+
```yaml
32+
ingress:
33+
main:
34+
enabled: true
35+
annotations:
36+
traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
37+
traefik.ingress.kubernetes.io/router.middlewares: "traefik-compress@kubernetescrd"
38+
hosts:
39+
- host: unifi.example.com
40+
paths:
41+
- path: /
42+
pathType: Prefix
43+
```
44+
45+
* Annotation added to use SSL (websecure) port
46+
* Annotation added to use compression middleware
47+
48+
* Define Persistent Storage
49+
* Storage needs to be large enough to hold Unifi Controller own internal database, backups and historical data
50+
* A 10 Gib Persistent volume mounted at `/unfi` is created
51+
52+
```yaml
53+
persistence:
54+
config:
55+
enabled: true
56+
type: pvc
57+
mountPath: /unifi
58+
accessMode: ReadWriteOnce
59+
size: 10Gi
60+
retain: true
61+
```
62+
63+
* Service type is `LoadBalancer` and specific IP Address can be defined
64+
65+
```yaml
66+
service:
67+
main:
68+
enabled: true
69+
type: LoadBalancer
70+
loadBalancerIP: 192.168.10.242
71+
```
72+
73+
---
74+
75+
Note the Unifi Controller application can take several minutes to become ready. Getting a `Bad Gateway` message after installation or upgrade is normal. Monitor the container logs to see when it is ready, or just try again in a few minutes.
76+
77+
---
78+
First time connecting should show this screen:
79+
![Unifi Controller Initial Installation Wizard](../unifi-controller/unifi-controller-initial-install.png)
80+
81+
From here you can restore your configuration from a backup or start building your network from scratch.
82+
83+
* NOTE if you had to change the name or IP Address of your controller to get it working on Kubernetes, then will need to use your existing (old) UniFi Controller to push a configuration change to all your devices to tell them to start reporting to your new controller.
84+
85+
One all the kinks are worked out, your network devices will start reporting in:
86+
87+
![Unifi Controller Console Screen Shot](../unifi-controller/unifi-controller-screenshot.png)
88+
89+
[Return to Application List](../)
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
2+
# References:
3+
# https://artifacthub.io/packages/helm/k8s-at-home/unifi
4+
# https://github.com/k8s-at-home/library-charts/blob/main/charts/stable/common/values.yaml
5+
---
6+
apiVersion: argoproj.io/v1alpha1
7+
kind: Application
8+
metadata:
9+
namespace: argocd
10+
name: unifi-controller
11+
# cascade deletes
12+
finalizers:
13+
- resources-finalizer.argocd.argoproj.io
14+
annotations:
15+
argocd.argoproj.io/sync-wave: "12" # Lower the number the sooner to deploy
16+
spec:
17+
project: default
18+
revisionHistoryLimit: 3
19+
20+
source:
21+
chart: unifi
22+
repoURL: https://k8s-at-home.com/charts/
23+
targetRevision: 5.1.2
24+
helm:
25+
values: |
26+
image:
27+
# renovate: datasource=docker depName=jacobalberty/unifi
28+
tag: "v7.1.68"
29+
30+
controller:
31+
enabled: true
32+
# Valid options are deployment, daemonset or statefulset
33+
type: statefulset
34+
revisionHistoryLimit: 3
35+
36+
env:
37+
TZ: "America/New York"
38+
UNIFI_UID: "999"
39+
UNIFI_GID: "999"
40+
JVM_INIT_HEAP_SIZE: "768M"
41+
JVM_MAX_HEAP_SIZE: "1536M"
42+
43+
ingress:
44+
main:
45+
enabled: true
46+
annotations:
47+
traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
48+
traefik.ingress.kubernetes.io/router.middlewares: "traefik-compress@kubernetescrd"
49+
hosts:
50+
- host: unifi.example.com
51+
paths:
52+
- path: /
53+
pathType: Prefix
54+
55+
persistence:
56+
config:
57+
enabled: true
58+
type: pvc
59+
mountPath: /unifi
60+
accessMode: ReadWriteOnce
61+
size: 10Gi
62+
retain: true
63+
64+
service:
65+
main:
66+
enabled: true
67+
type: LoadBalancer
68+
loadBalancerIP: 192.168.10.242
69+
70+
resources:
71+
limits:
72+
cpu: 250m
73+
memory: 2048Mi
74+
requests:
75+
cpu: 75m
76+
memory: 1280Mi
77+
78+
destination:
79+
server: https://kubernetes.default.svc
80+
namespace: unifi
81+
82+
# Allow changes to number of replicas (down to zero)
83+
ignoreDifferences:
84+
- group: apps
85+
kind: StatefulSet
86+
jsonPointers:
87+
- /spec/replicas
88+
89+
syncPolicy:
90+
automated:
91+
prune: true
92+
selfHeal: true
93+
syncOptions:
94+
- Validate=true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: unifi

0 commit comments

Comments
 (0)