mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-09 04:15:52 +10:00
207 lines
4.4 KiB
YAML
207 lines
4.4 KiB
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
namespace: home-apps
|
|
name: adguard-nfs-pvc
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: nfs-client
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: adguard
|
|
namespace: home-apps
|
|
labels:
|
|
app: adguard
|
|
spec:
|
|
revisionHistoryLimit: 3
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: adguard
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: adguard
|
|
name: adguard
|
|
spec:
|
|
nodeSelector:
|
|
gateway: "true"
|
|
tolerations:
|
|
- effect: NoSchedule
|
|
operator: Exists
|
|
imagePullSecrets:
|
|
- name: regcred
|
|
containers:
|
|
- name: adguard
|
|
image: adguard/adguardhome:v0.108.0-b.33
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 80
|
|
name: adguard-http
|
|
protocol: TCP
|
|
- containerPort: 3000
|
|
name: adguard-http2
|
|
protocol: TCP
|
|
- containerPort: 53
|
|
name: dns
|
|
protocol: TCP
|
|
- containerPort: 53
|
|
name: dns-udp
|
|
protocol: UDP
|
|
- containerPort: 443
|
|
name: adguard-ssl
|
|
protocol: TCP
|
|
- containerPort: 67
|
|
name: client-udp
|
|
protocol: UDP
|
|
- containerPort: 68
|
|
name: dhcp
|
|
protocol: TCP
|
|
- containerPort: 68
|
|
name: dhcp-udp
|
|
protocol: UDP
|
|
- containerPort: 853
|
|
name: dns-over-tls
|
|
protocol: TCP
|
|
- containerPort: 784
|
|
name: dns-over-quic2
|
|
protocol: UDP
|
|
- containerPort: 853
|
|
name: dns-over-quic
|
|
protocol: UDP
|
|
- containerPort: 5443
|
|
name: dnscrypt-tcp
|
|
protocol: TCP
|
|
- containerPort: 5443
|
|
name: dnscrypt-udp
|
|
protocol: UDP
|
|
env:
|
|
- name: TZ
|
|
value: "Australia/Melbourne"
|
|
volumeMounts:
|
|
- name: configs
|
|
subPath: conf
|
|
mountPath: "/opt/adguardhome/conf"
|
|
- name: configs
|
|
subPath: work
|
|
mountPath: "/opt/adguardhome/work"
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: 400m
|
|
memory: 1Gi
|
|
volumes:
|
|
- name: configs
|
|
persistentVolumeClaim:
|
|
claimName: adguard-nfs-pvc
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: adguard-metallb
|
|
namespace: home-apps
|
|
annotations:
|
|
metallb.universe.tf/address-pool: home-pool
|
|
metallb.universe.tf/loadBalancerIPs: 192.168.1.200
|
|
labels:
|
|
name: adguard-dns
|
|
spec:
|
|
type: LoadBalancer
|
|
# externalIPs:
|
|
# - 192.168.1.200
|
|
selector:
|
|
app: adguard
|
|
ports:
|
|
- name: dns
|
|
port: 53
|
|
protocol: UDP
|
|
- name: dnstcp
|
|
port: 53
|
|
protocol: TCP
|
|
- port: 67
|
|
name: client-udp
|
|
protocol: UDP
|
|
- port: 68
|
|
name: dhcp
|
|
protocol: TCP
|
|
- port: 68
|
|
name: dhcp-udp
|
|
protocol: UDP
|
|
- port: 853
|
|
name: dns-over-tls
|
|
protocol: TCP
|
|
- port: 784
|
|
name: dns-over-quic2
|
|
protocol: UDP
|
|
- port: 853
|
|
name: dns-over-quic
|
|
protocol: UDP
|
|
- port: 5443
|
|
name: dnscrypt-tcp
|
|
protocol: TCP
|
|
- port: 5443
|
|
name: dnscrypt-udp
|
|
protocol: UDP
|
|
- port: 3000
|
|
name: adguard-http2
|
|
protocol: TCP
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: adguard-web
|
|
namespace: home-apps
|
|
labels:
|
|
name: adguard-web
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: adguard
|
|
ports:
|
|
- name: adguard
|
|
targetPort: adguard-http
|
|
port: 80
|
|
protocol: TCP
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: adguard-ingress
|
|
namespace: home-apps
|
|
annotations:
|
|
kubernetes.io/ingress.class: "nginx"
|
|
kubernetes.io/tls-acme: "true"
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
nginx.ingress.kubernetes.io/auth-url: "https://id.junv.me/oauth2/auth"
|
|
nginx.ingress.kubernetes.io/auth-signin: "https://id.junv.me/oauth2/start?rd=https%3A%2F%2F$host$request_uri"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- adguard.junv.me
|
|
secretName: adguard-tls
|
|
rules:
|
|
- host: adguard.junv.me
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: adguard-web
|
|
port:
|
|
number: 3000
|
|
path: /
|
|
pathType: Prefix
|