Files
K3S/addons/technitium-dns/role/chart/templates/service-secondary.yaml
Sergey Antropoff f3dfe87d03 feat: добавить аддон technitium-dns — HA DNS Primary+Secondary с kube-vip LB и zone sync
- Helm chart: Primary и Secondary Deployment, kube-vip LoadBalancer сервисы (UDP+TCP :53),
  ClusterIP для Web UI, PVC (ReadWriteOnce), Secret, Ingress
- CronJob sync (*/5 мин): Python sync.py опрашивает Technitium REST API, создаёт Secondary
  зоны на secondary и вызывает forceSyncZone для каждой зоны
- ExternalDNS (disabled по умолчанию): RFC 2136 DDNS для автоматических DNS-записей из Ingress
- Ansible role: validate, namespace, Helm deploy, cleanup secrets, summary с Keenetic-инструкцией
- Интеграция: Makefile, playbooks/addons.yml, group_vars/all/addons.yml, vault.yml.example
- README с архитектурой, Keenetic-конфигурацией и troubleshooting
2026-04-26 17:58:28 +03:00

50 lines
1.3 KiB
YAML

{{- if .Values.secondary.enabled }}
---
# DNS LoadBalancer service for secondary
apiVersion: v1
kind: Service
metadata:
name: {{ include "technitium-dns.name" . }}-secondary
namespace: {{ .Release.Namespace }}
labels:
{{- include "technitium-dns.labels" . | nindent 4 }}
app.kubernetes.io/component: secondary
annotations:
kube-vip.io/loadbalancerIPs: {{ .Values.secondary.ip | quote }}
spec:
type: LoadBalancer
externalTrafficPolicy: Local
selector:
{{- include "technitium-dns.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: secondary
ports:
- name: dns-udp
port: 53
targetPort: 53
protocol: UDP
- name: dns-tcp
port: 53
targetPort: 53
protocol: TCP
---
# ClusterIP service for secondary Web UI
apiVersion: v1
kind: Service
metadata:
name: {{ include "technitium-dns.name" . }}-secondary-web
namespace: {{ .Release.Namespace }}
labels:
{{- include "technitium-dns.labels" . | nindent 4 }}
app.kubernetes.io/component: secondary
spec:
type: ClusterIP
selector:
{{- include "technitium-dns.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: secondary
ports:
- name: web-ui
port: 5380
targetPort: 5380
protocol: TCP
{{- end }}