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: ...@@ -63,10 +63,12 @@ spec:
matchLabels: matchLabels:
kubernetes.io/metadata.name: ssh-port-forward kubernetes.io/metadata.name: ssh-port-forward
ports: ports:
- port: 9000 - port: 443
protocol: TCP
- port: 80
protocol: TCP protocol: TCP
{{- with (.Values.networkPolicy).additionalEgressConfig }} {{- with (.Values.networkPolicy).additionalEgressConfig }}
- to: {{ toYaml . | indent 2 }}
{{ toYaml . | indent 8 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
\ No newline at end of file
...@@ -82,54 +82,28 @@ tests: ...@@ -82,54 +82,28 @@ tests:
matchLabels: matchLabels:
kubernetes.io/metadata.name: ssh-port-forward kubernetes.io/metadata.name: ssh-port-forward
ports: ports:
- port: 9000 - port: 443
protocol: TCP
- port: 80
protocol: TCP protocol: TCP
- it: add ingress rule by values - it: add egress rules by values
set: set:
networkPolicy: networkPolicy:
ssoPublicIp: 51.89.117.53/32
dnsServerNamespace: test-dns-namespace
additionalEgressConfig: additionalEgressConfig:
- podSelector: - to:
matchLabels: - ipBlock:
component: client2 cidr: 1.2.3.4/32
asserts: asserts:
- equal: - contains:
path: spec.egress path: spec.egress
value: content:
- to: to:
- podSelector: - ipBlock:
matchLabels: cidr: 1.2.3.4/32
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
- it: test network policy disabled - it: test network policy disabled
set: set:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment