92 lines
1.8 KiB
YAML
92 lines
1.8 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: adguard-svc
|
|
namespace: adguard
|
|
spec:
|
|
selector:
|
|
app: adguard
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8082
|
|
targetPort: 3000
|
|
name: http-init
|
|
- protocol: TCP
|
|
port: 8081
|
|
targetPort: 80
|
|
name: http
|
|
- protocol: TCP
|
|
port: 53
|
|
targetPort: 53
|
|
name: dns-tcp
|
|
- protocol: UDP
|
|
port: 53
|
|
targetPort: 53
|
|
name: dns-udp
|
|
type: LoadBalancer
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: adguard
|
|
namespace: adguard
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: adguard
|
|
replicas: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: adguard
|
|
spec:
|
|
containers:
|
|
- name: adguard
|
|
image: adguard/adguardhome:latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
- containerPort: 53
|
|
name: dns
|
|
- containerPort: 3000
|
|
name: init
|
|
volumeMounts:
|
|
- name: adguard-data
|
|
mountPath: /opt/adguardhome/work
|
|
- name: adguard-conf
|
|
mountPath: /opt/adguardhome/conf
|
|
volumes:
|
|
- name: adguard-data
|
|
persistentVolumeClaim:
|
|
claimName: adguard-pvc-data
|
|
- name: adguard-conf
|
|
persistentVolumeClaim:
|
|
claimName: adguard-pvc-conf
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: adguard-pvc-conf
|
|
namespace: adguard
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: local-path
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: adguard-pvc-data
|
|
namespace: adguard
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: local-path
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|