From 08237026859a52e68966c98ef27cd2ecbafba4ca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 18 Jul 2021 11:18:58 +0200 Subject: [PATCH] Add knot test deployments --- tests/knot-tcp-udp-deployment.yaml | 65 ++++++++++++++++++++++++++++++ tests/knot-tcp-udp.yaml | 56 +++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 tests/knot-tcp-udp-deployment.yaml create mode 100644 tests/knot-tcp-udp.yaml diff --git a/tests/knot-tcp-udp-deployment.yaml b/tests/knot-tcp-udp-deployment.yaml new file mode 100644 index 0000000..b87e79b --- /dev/null +++ b/tests/knot-tcp-udp-deployment.yaml @@ -0,0 +1,65 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-knot-deployment +spec: + selector: + matchLabels: + app: test-knot-deployment + replicas: 2 + template: + metadata: + labels: + app: test-knot-deployment + 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" + args: + - knotd + volumes: + - name: config + configMap: + name: test-knot-config-deployment +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-knot-config-deployment +data: + knot.conf: | + server: + listen: 0.0.0.0@53 + listen: ::@53 + + log: + - target: stdout + + zone: + - domain: example.com + file: /config/example.com + example.com: | + $TTL 60 + @ IN SOA dns3.ungleich.ch. root.ungleich.ch. ( + 2021021800 ; serial number of this zone file + 1d ; slave refresh (1 day) + 2h ; slave retry time in case of a problem (2 hours) + 4w ; slave expiration time (4 weeks) + 1w ; maximum caching time in case of failed lookups (1 hour) + ) + + NS dns1.ungleich.ch. + + + test AAAA 2a0a:e5c0:13::42 diff --git a/tests/knot-tcp-udp.yaml b/tests/knot-tcp-udp.yaml new file mode 100644 index 0000000..bc5bad5 --- /dev/null +++ b/tests/knot-tcp-udp.yaml @@ -0,0 +1,56 @@ +apiVersion: v1 +kind: Pod +metadata: + name: test-knot +spec: + containers: + - name: test-knot + image: cznic/knot:3.0 + args: + - knotd + ports: + - name: udp-53 + containerPort: 53 + protocol: UDP + - name: tcp-53 + containerPort: 53 + protocol: TCP + volumeMounts: + - name: config + mountPath: "/config" + volumes: + - name: config + configMap: + name: test-knot-config + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-knot-config +data: + knot.conf: | + server: + listen: 0.0.0.0@53 + listen: ::@53 + + log: + - target: stdout + + zone: + - domain: example.com + file: /config/example.com + example.com: | + $TTL 60 + @ IN SOA dns3.ungleich.ch. root.ungleich.ch. ( + 2021021800 ; serial number of this zone file + 1d ; slave refresh (1 day) + 2h ; slave retry time in case of a problem (2 hours) + 4w ; slave expiration time (4 weeks) + 1w ; maximum caching time in case of failed lookups (1 hour) + ) + + NS dns1.ungleich.ch. + + + test AAAA 2a0a:e5c0:13::42