feat: Add AdGuard Home Helm chart with deployment, services, ingress, and values configuration

This commit is contained in:
sha
2026-03-26 20:57:31 +02:00
parent 07facc58fc
commit 965420e54e
6 changed files with 171 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/component: dns-server
app.kubernetes.io/part-of: network-services
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: dns-tcp
containerPort: 53
protocol: TCP
- name: dns-udp
containerPort: 53
protocol: UDP
- name: http
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
- name: admin
containerPort: 3000
protocol: TCP
env:
- name: TZ
value: {{ .Values.timezone | quote }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: work
mountPath: /opt/adguardhome/work
- name: conf
mountPath: /opt/adguardhome/conf
volumes:
- name: work
hostPath:
path: {{ .Values.volumes.work.hostPath }}
type: DirectoryOrCreate
- name: conf
hostPath:
path: {{ .Values.volumes.conf.hostPath }}
type: DirectoryOrCreate
+27
View File
@@ -0,0 +1,27 @@
{{- range $name, $config := .Values.ingresses }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $.Release.Name }}-{{ $name }}
{{- with $config.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
rules:
- host: {{ $config.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $.Release.Name }}-service
port:
number: 80
{{- with $config.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
+25
View File
@@ -0,0 +1,25 @@
{{- if .Values.dns.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-dns
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
type: {{ .Values.dns.type }}
{{- if eq .Values.dns.type "LoadBalancer" }}
externalTrafficPolicy: {{ .Values.dns.externalTrafficPolicy }}
{{- end }}
selector:
app: {{ .Release.Name }}
ports:
- name: dns-tcp
port: 53
targetPort: 53
protocol: TCP
- name: dns-udp
port: 53
targetPort: 53
protocol: UDP
{{- end }}
+16
View File
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-service
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
type: ClusterIP
selector:
app: {{ .Release.Name }}
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP