From 7a81b4ea8be94321e5c4d7bb44dc46788dda8b85 Mon Sep 17 00:00:00 2001 From: mr-forust Date: Sat, 3 Oct 2026 10:36:15 +0200 Subject: [PATCH] feat(adguard): add netbird sidecar --- adguardhome/k8s/adguard.yaml | 35 ++++++++++++++++++++ adguardhome/k8s/config.yaml | 10 ++++++ adguardhome/k8s/netbird-secrets.yaml.example | 8 +++++ 3 files changed, 53 insertions(+) create mode 100644 adguardhome/k8s/config.yaml create mode 100644 adguardhome/k8s/netbird-secrets.yaml.example diff --git a/adguardhome/k8s/adguard.yaml b/adguardhome/k8s/adguard.yaml index b074548..074cdfe 100644 --- a/adguardhome/k8s/adguard.yaml +++ b/adguardhome/k8s/adguard.yaml @@ -68,6 +68,35 @@ spec: reloader.stakater.com/auto: "true" spec: containers: + - name: netbird + image: netbirdio/netbird:0.80.0 + envFrom: + - configMapRef: + name: adguard-config + env: + - name: NB_SETUP_KEY + valueFrom: + secretKeyRef: + name: adguard-netbird-secrets + key: NB_SETUP_KEY + securityContext: + capabilities: + add: + - NET_ADMIN + - SYS_ADMIN + - SYS_RESOURCE + resources: + requests: + memory: "64Mi" + cpu: "50m" + limits: + memory: "256Mi" + cpu: "200m" + volumeMounts: + - name: netbird-state + mountPath: /var/lib/netbird + - name: dev-tun + mountPath: /dev/net/tun - name: adguard image: adguard/adguardhome:v0.107.79 resources: @@ -95,6 +124,12 @@ spec: mountPath: /certs readOnly: true volumes: + - name: netbird-state + emptyDir: {} + - name: dev-tun + hostPath: + path: /dev/net/tun + type: CharDevice - name: adguard-data persistentVolumeClaim: claimName: adguard-pvc diff --git a/adguardhome/k8s/config.yaml b/adguardhome/k8s/config.yaml new file mode 100644 index 0000000..ebc2f64 --- /dev/null +++ b/adguardhome/k8s/config.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: adguard-config + namespace: adguard +data: + NB_MANAGEMENT_URL: "https://nb.forust.xyz" + NB_HOSTNAME: "adguard" + NB_LOG_LEVEL: "info" + NB_DISABLE_DNS: "true" diff --git a/adguardhome/k8s/netbird-secrets.yaml.example b/adguardhome/k8s/netbird-secrets.yaml.example new file mode 100644 index 0000000..a9d0188 --- /dev/null +++ b/adguardhome/k8s/netbird-secrets.yaml.example @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: adguard-netbird-secrets + namespace: adguard +type: Opaque +stringData: + NB_SETUP_KEY: "REPLACE_ME"