ungleich-k8s/apps/knotdns/templates/deployment.yaml

70 lines
1.5 KiB
YAML
Raw Normal View History

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-knot
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-knot
2021-07-17 23:42:12 +00:00
replicas: 2
template:
metadata:
labels:
app: {{ .Release.Name }}-knot
use-as-service: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath
"/knotconf.yaml") . | sha256sum }}
spec:
containers:
- name: knot
image: cznic/knot:3.0
ports:
- name: udp-53
containerPort: 53
protocol: UDP
- name: tcp-53
containerPort: 53
protocol: TCP
volumeMounts:
- name: config
mountPath: "/config"
- name: zones
mountPath: "/zones"
args:
- knotd
volumes:
- name: config
configMap:
name: {{ tpl .Values.identifier . }}-config
- name: zones
configMap:
name: {{ tpl .Values.identifier . }}-zones
---
apiVersion: v1
kind: Service
metadata:
name: {{ tpl .Values.identifier . }}
labels:
app: {{ tpl .Values.identifier . }}
spec:
type: ClusterIP
ports:
- port: 53
protocol: TCP
name: tcp-53
- port: 53
protocol: UDP
name: udp-53
selector:
use-as-service: {{ .Release.Name }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ tpl .Values.identifier . }}-zones
data:
{{ tpl (.Files.Glob "zones/*").AsConfig . | indent 2 }}