Files
helm-charts/adguardhome/templates/deployment.yaml
T
shaandClaude Sonnet 5 8d7e017109 Fix adguardhome PVC mount shadowing the binary
Mounting the whole PVC at /opt/adguardhome hid the AdGuardHome binary
that ships inside the image at that exact path, crash-looping the pod
(exec: /opt/adguardhome/AdGuardHome: no such file or directory). Use
subPath mounts for work/ and conf/ instead, same as the original split
hostPath layout, just backed by one PVC now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01566weDFku8TaRC2CJUPVM1
2026-08-24 02:49:12 +03:00

62 lines
1.9 KiB
YAML

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:
# subPath mounts, not the whole /opt/adguardhome -- the AdGuardHome
# binary itself ships inside the image at /opt/adguardhome/AdGuardHome,
# so mounting the entire parent directory shadows it.
- name: data
mountPath: /opt/adguardhome/work
subPath: work
- name: data
mountPath: /opt/adguardhome/conf
subPath: conf
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" .Release.Name) }}