2026-01-19 16:31:11 +01:00
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: {{ include "unbound.fullname" . }}
|
|
|
|
|
namespace: {{ .Values.global.namespace }}
|
|
|
|
|
labels:
|
|
|
|
|
{{- include "unbound.labels" . | nindent 4 }}
|
|
|
|
|
spec:
|
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
{{- include "unbound.selectorLabels" . | nindent 6 }}
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
{{- with .Values.podAnnotations }}
|
|
|
|
|
annotations:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
labels:
|
|
|
|
|
{{- include "unbound.selectorLabels" . | nindent 8 }}
|
|
|
|
|
spec:
|
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
|
imagePullSecrets:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
serviceAccountName: {{ include "unbound.serviceAccountName" . }}
|
|
|
|
|
securityContext:
|
|
|
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
|
containers:
|
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
|
securityContext:
|
|
|
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
|
ports:
|
|
|
|
|
- name: dns-udp
|
|
|
|
|
containerPort: {{ .Values.service.ports.dnsUdp }}
|
|
|
|
|
protocol: UDP
|
|
|
|
|
- name: dns-tcp
|
|
|
|
|
containerPort: {{ .Values.service.ports.dnsTcp }}
|
|
|
|
|
protocol: TCP
|
|
|
|
|
{{- if .Values.probes.readiness.enabled }}
|
|
|
|
|
readinessProbe:
|
|
|
|
|
exec:
|
|
|
|
|
command:
|
|
|
|
|
- sh
|
|
|
|
|
- -c
|
|
|
|
|
- {{ .Values.probes.readiness.command | quote }}
|
|
|
|
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
|
|
|
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.probes.liveness.enabled }}
|
|
|
|
|
livenessProbe:
|
|
|
|
|
exec:
|
|
|
|
|
command:
|
|
|
|
|
- sh
|
|
|
|
|
- -c
|
|
|
|
|
- {{ .Values.probes.liveness.command | quote }}
|
|
|
|
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
|
|
|
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
resources:
|
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
|
volumeMounts:
|
2026-01-19 22:28:53 +01:00
|
|
|
{{- if .Values.config.enabled }}
|
|
|
|
|
{{- if .Values.config.forwardRecords }}
|
|
|
|
|
- name: unbound-config
|
|
|
|
|
mountPath: /opt/unbound/etc/unbound/forward-records.conf
|
|
|
|
|
subPath: forward-records.conf
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.config.serverConfig }}
|
|
|
|
|
- name: unbound-config
|
|
|
|
|
mountPath: /opt/unbound/etc/unbound/a-records.conf
|
|
|
|
|
subPath: a-records.conf
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.config.content }}
|
|
|
|
|
- name: unbound-config
|
|
|
|
|
mountPath: /opt/unbound/etc/unbound/unbound.conf
|
|
|
|
|
subPath: unbound.conf
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.volumeMounts }}
|
2026-01-19 16:31:11 +01:00
|
|
|
{{- toYaml . | nindent 12 }}
|
2026-01-19 22:28:53 +01:00
|
|
|
{{- end }}
|
2026-01-19 16:31:11 +01:00
|
|
|
{{- with .Values.env }}
|
|
|
|
|
env:
|
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
volumes:
|
2026-01-19 22:28:53 +01:00
|
|
|
{{- if .Values.config.enabled }}
|
|
|
|
|
- name: unbound-config
|
|
|
|
|
configMap:
|
|
|
|
|
name: {{ include "unbound.fullname" . }}-config
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.volumes }}
|
2026-01-19 16:31:11 +01:00
|
|
|
{{- toYaml . | nindent 8 }}
|
2026-01-19 22:28:53 +01:00
|
|
|
{{- end }}
|
2026-01-19 16:31:11 +01:00
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
|
nodeSelector:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
|
affinity:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
|
tolerations:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.extraInitContainers }}
|
|
|
|
|
initContainers:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.extraContainers }}
|
|
|
|
|
containers:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|