Skip to content
Snippets Groups Projects
Commit be092bab authored by OZG-Cloud Team's avatar OZG-Cloud Team
Browse files

OZG-3880 network policy dynamic dns server config

parent e6a05996
Branches
Tags
No related merge requests found
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
set -e set -e
helm template ./src/main/helm/ -f src/test/unit-values.yaml helm template ./src/main/helm/ -f src/test/helm-linter-values.yaml
helm lint -f src/test/unit-values.yaml ./src/main/helm/ helm lint -f src/test/helm-linter-values.yaml ./src/main/helm/
cd src/main/helm && helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' . cd src/main/helm && helm unittest --helm3 -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' .
\ No newline at end of file
...@@ -26,3 +26,6 @@ ozgcloud: ...@@ -26,3 +26,6 @@ ozgcloud:
environment: test environment: test
bezeichner: helm bezeichner: helm
bundesland: sh bundesland: sh
networkPolicy:
dnsServerNamespace: test-dns-server-namespace
\ No newline at end of file
...@@ -30,14 +30,23 @@ templates: ...@@ -30,14 +30,23 @@ templates:
- templates/network_policy.yaml - templates/network_policy.yaml
tests: tests:
- it: should match apiVersion - it: should match apiVersion
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts: asserts:
- isAPIVersion: - isAPIVersion:
of: networking.k8s.io/v1 of: networking.k8s.io/v1
- it: should match kind - it: should match kind
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts: asserts:
- isKind: - isKind:
of: NetworkPolicy of: NetworkPolicy
- it: validate metadata - it: validate metadata
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts: asserts:
- equal: - equal:
path: metadata path: metadata
...@@ -45,6 +54,9 @@ tests: ...@@ -45,6 +54,9 @@ tests:
name: network-policy-afm-adapter name: network-policy-afm-adapter
namespace: by-helm-test namespace: by-helm-test
- it: validate spec - it: validate spec
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts: asserts:
- equal: - equal:
path: spec path: spec
...@@ -69,7 +81,7 @@ tests: ...@@ -69,7 +81,7 @@ tests:
- to: - to:
- namespaceSelector: - namespaceSelector:
matchLabels: matchLabels:
kubernetes.io/metadata.name: dummy-dns-namespace kubernetes.io/metadata.name: test-dns-namespace
ports: ports:
- port: 53 - port: 53
protocol: UDP protocol: UDP
...@@ -80,6 +92,7 @@ tests: ...@@ -80,6 +92,7 @@ tests:
set: set:
networkPolicy: networkPolicy:
disabled: true disabled: true
dnsServerNamespace: test-dns-namespace
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 0 count: 0
...@@ -88,6 +101,7 @@ tests: ...@@ -88,6 +101,7 @@ tests:
set: set:
networkPolicy: networkPolicy:
disabled: false disabled: false
dnsServerNamespace: test-dns-namespace
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
\ No newline at end of file
...@@ -42,6 +42,3 @@ imageCredentials: ...@@ -42,6 +42,3 @@ imageCredentials:
username: ozgcloud username: ozgcloud
password: <geheim> password: <geheim>
email: webmaster@ozg-sh.de email: webmaster@ozg-sh.de
networkPolicy:
dnsServerNamespace: dummy-dns-namespace
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment