diff --git a/apps/knotdns/Chart.yaml b/apps/knotdns/Chart.yaml index 4c59751..d2d962b 100644 --- a/apps/knotdns/Chart.yaml +++ b/apps/knotdns/Chart.yaml @@ -2,23 +2,4 @@ apiVersion: v2 name: knotdns description: DNS Auth -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "any" diff --git a/apps/knotdns/templates/deployment.yaml b/apps/knotdns/templates/deployment.yaml index 2de1941..2eeaf29 100644 --- a/apps/knotdns/templates/deployment.yaml +++ b/apps/knotdns/templates/deployment.yaml @@ -13,13 +13,20 @@ spec: labels: app: {{ .Release.Name }}-knot use-as-service: {{ .Release.Name }} + annotations: + checksum/config: {{ include (print $.Template.BasePath + "/knotconf.yaml") . | sha256sum }} spec: - initContainers: containers: - name: knot image: cznic/knot:3.0 ports: - - containerPort: 53 + - name: udp-53 + containerPort: 53 + protocol: UDP + - name: tcp-53 + containerPort: 53 + protocol: TCP volumeMounts: - name: config mountPath: "/config" @@ -60,35 +67,3 @@ metadata: name: {{ tpl .Values.identifier . }}-zones data: {{ tpl (.Files.Glob "zones/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ tpl .Values.identifier . }}-config -data: - knot.conf: | - server: - listen: 0.0.0.0@53 - listen: ::@53 - - log: - - target: stdout - - zone: - - domain: place7.ungleich.ch - file: /zones/place7.ungleich.ch - - notknot.conf: | - server: - listen: 0.0.0.0@53 - listen: ::@53 - - log: - - target: stdout - - zone: - {{- range $path, $_ := .Files.Glob "zones/*" }} - {{- $domain := base $path }} - {{ printf "- domain: %s" $domain | indent 2}} - {{ printf "file: /zones/%s" $domain | indent 4}} - {{ end }} diff --git a/apps/knotdns/templates/knotconf.yaml b/apps/knotdns/templates/knotconf.yaml new file mode 100644 index 0000000..e10dd17 --- /dev/null +++ b/apps/knotdns/templates/knotconf.yaml @@ -0,0 +1,32 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ tpl .Values.identifier . }}-config +data: + knot.conf: | + server: + listen: 0.0.0.0@53 + listen: ::@53 + + log: + - target: stdout + + zone: + - domain: place7.ungleich.ch + file: /zones/place7.ungleich.ch + + notknot.conf: | + server: + listen: 0.0.0.0@53 + listen: ::@53 + + log: + - target: stdout + + zone: + {{- range $path, $_ := .Files.Glob "zones/*" }} + {{- $domain := base $path }} + {{ printf "- domain: %s" $domain | indent 2}} + {{ printf "file: /zones/%s" $domain | indent 4}} + {{ end }}