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

OZG-3880 network-policy fix xta egress rule

parent 58a3205d
Branches
Tags
No related merge requests found
......@@ -63,10 +63,12 @@ spec:
matchLabels:
kubernetes.io/metadata.name: ssh-port-forward
ports:
- port: 9000
- port: 443
protocol: TCP
- port: 80
protocol: TCP
{{- with (.Values.networkPolicy).additionalEgressConfig }}
- to:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- end }}
\ No newline at end of file
......@@ -82,54 +82,28 @@ tests:
matchLabels:
kubernetes.io/metadata.name: ssh-port-forward
ports:
- port: 9000
- port: 443
protocol: TCP
- port: 80
protocol: TCP
- it: add ingress rule by values
- it: add egress rules by values
set:
networkPolicy:
ssoPublicIp: 51.89.117.53/32
dnsServerNamespace: test-dns-namespace
additionalEgressConfig:
- podSelector:
matchLabels:
component: client2
- to:
- ipBlock:
cidr: 1.2.3.4/32
asserts:
- equal:
- contains:
path: spec.egress
value:
- to:
- podSelector:
matchLabels:
component: vorgang-manager
ports:
- port: 9090
protocol: TCP
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
- port: 5353
protocol: UDP
- port: 5353
protocol: TCP
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: ssh-port-forward
ports:
- port: 9000
protocol: TCP
- to:
- podSelector:
matchLabels:
component: client2
content:
to:
- ipBlock:
cidr: 1.2.3.4/32
- it: test network policy disabled
set:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment