2021-07-17 22:16:35 +00:00
|
|
|
---
|
|
|
|
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
|
2021-07-17 22:16:35 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ .Release.Name }}-knot
|
|
|
|
use-as-service: {{ .Release.Name }}
|
2021-07-18 08:49:33 +00:00
|
|
|
annotations:
|
|
|
|
checksum/config: {{ include (print $.Template.BasePath
|
|
|
|
"/knotconf.yaml") . | sha256sum }}
|
2021-07-17 22:16:35 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: knot
|
|
|
|
image: cznic/knot:3.0
|
|
|
|
ports:
|
2021-07-18 08:49:33 +00:00
|
|
|
- name: udp-53
|
|
|
|
containerPort: 53
|
|
|
|
protocol: UDP
|
|
|
|
- name: tcp-53
|
|
|
|
containerPort: 53
|
|
|
|
protocol: TCP
|
2021-07-17 22:16:35 +00:00
|
|
|
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 }}
|