diff --git a/apps/adguard-home/base/deployment.yaml b/apps/adguard-home/base/deployment.yaml new file mode 100644 index 0000000..34d0e6c --- /dev/null +++ b/apps/adguard-home/base/deployment.yaml @@ -0,0 +1,79 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: adguard-home + namespace: adguard-home + labels: + app.kubernetes.io/name: adguard-home +spec: + selector: + matchLabels: + app.kubernetes.io/name: adguard-home + template: + metadata: + labels: + app.kubernetes.io/name: adguard-home + spec: + containers: + - name: adguard-home + image: adguard/adguardhome:v0.107.51 + ports: + - protocol: TCP + containerPort: 53 + name: dns-tcp + - protocol: UDP + containerPort: 53 + name: dns-udp + - protocol: UDP + containerPort: 67 + name: dhcps-udp + - protocol: UDP + containerPort: 68 + name: dhcpc-udp + - protocol: TCP + containerPort: 80 + name: http-tcp + - protocol: TCP + containerPort: 443 + name: https-tcp + - protocol: UDP + containerPort: 443 + name: https-udp + - protocol: TCP + containerPort: 853 + name: dns-tls-tcp + - protocol: UDP + containerPort: 853 + name: dns-tls-udp + - protocol: TCP + containerPort: 3000 + name: http-alt-tcp + - protocol: UDP + containerPort: 3000 + name: http-alt-udp + - protocol: TCP + containerPort: 5443 + name: dnscrypt-tcp + - protocol: UDP + containerPort: 5443 + name: dnscrypt-udp + - protocol: TCP + containerPort: 6060 + name: http-pprof + env: + - name: TZ + value: Australia/Sydney + volumeMounts: + - name: adguard-home-data + mountPath: /opt/adguardhome/work + - name: adguard-home-config + mountPath: /opt/adguardhome/conf + volumes: + - name: adguard-home-data + hostPath: + path: /mnt/nfs/AppData/adguardhome/work + type: Directory + - name: adguard-home-config + hostPath: + path: /mnt/nfs/AppData/adguardhome/conf + type: Directory diff --git a/apps/adguard-home/base/kustomization.yaml b/apps/adguard-home/base/kustomization.yaml new file mode 100644 index 0000000..87b09a3 --- /dev/null +++ b/apps/adguard-home/base/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./deployment.yaml + - ./service.yaml \ No newline at end of file diff --git a/apps/adguard-home/base/service.yaml b/apps/adguard-home/base/service.yaml new file mode 100644 index 0000000..e411e55 --- /dev/null +++ b/apps/adguard-home/base/service.yaml @@ -0,0 +1,69 @@ +apiVersion: v1 +kind: Service +metadata: + name: adguard-home + namespace: adguard-home + labels: + app.kubernetes.io/name: adguard-home +spec: + selector: + app.kubernetes.io/name: adguard-home + type: LoadBalancer + internalTrafficPolicy: Cluster + ports: + - protocol: TCP + port: 53 + targetPort: 53 + name: dns-tcp + - protocol: UDP + port: 53 + targetPort: 53 + name: dns-udp + - protocol: UDP + port: 67 + targetPort: 67 + name: dhcps-udp + - protocol: UDP + port: 68 + targetPort: 68 + name: dhcpc-udp + - protocol: TCP + port: 10080 + targetPort: 80 + name: http-tcp + - protocol: TCP + port: 443 + targetPort: 443 + name: https-tcp + - protocol: UDP + port: 443 + targetPort: 443 + name: https-udp + - protocol: TCP + port: 853 + targetPort: 853 + name: dns-tls-tcp + - protocol: UDP + port: 853 + targetPort: 853 + name: dns-tls-udp + - protocol: TCP + port: 13000 + targetPort: 3000 + name: https-alt-tcp + - protocol: UDP + port: 13000 + targetPort: 3000 + name: https-alt-udp + - protocol: TCP + port: 5443 + targetPort: 5443 + name: dnscrypt-tcp + - protocol: UDP + port: 5443 + targetPort: 5443 + name: dnscrypt-udp + - protocol: TCP + port: 6060 + targetPort: 6060 + name: https-pprof diff --git a/apps/adguard-home/env/k3s-cluster/config.json b/apps/adguard-home/env/k3s-cluster/config.json new file mode 100644 index 0000000..91f72d6 --- /dev/null +++ b/apps/adguard-home/env/k3s-cluster/config.json @@ -0,0 +1,12 @@ +{ + "appName": "adguard-home", + "userGivenName": "adguard-home", + "namespace": "adguard-home", + "destNamespace": "adguard-home", + "destServer": "https://kubernetes.default.svc", + "srcPath": "apps/adguard-home/env/k3s-cluster", + "srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git", + "srcTargetRevision": "", + "labels": null, + "annotations": null +} \ No newline at end of file diff --git a/apps/adguard-home/env/k3s-cluster/ingress.yaml b/apps/adguard-home/env/k3s-cluster/ingress.yaml new file mode 100644 index 0000000..d44c2b5 --- /dev/null +++ b/apps/adguard-home/env/k3s-cluster/ingress.yaml @@ -0,0 +1,61 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: adguard-home-ingress + namespace: adguard-home + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/use-regex: "true" +spec: + ingressClassName: nginx + rules: + - host: "adguard-home.cluster.edward.sydney" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: adguard-home + port: + number: 10080 + - host: "adguard-home.cluster.local" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: adguard-home + port: + number: 10080 + - host: "setup.adguard-home.cluster.edward.sydney" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: adguard-home + port: + number: 13000 + - host: "setup.adguard-home.cluster.local" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: adguard-home + port: + number: 13000 + - host: "doh.adguard-home.cluster.edward.sydney" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: adguard-home + port: + number: 443 diff --git a/apps/adguard-home/env/k3s-cluster/kustomization.yaml b/apps/adguard-home/env/k3s-cluster/kustomization.yaml new file mode 100644 index 0000000..a227ac4 --- /dev/null +++ b/apps/adguard-home/env/k3s-cluster/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../base \ No newline at end of file