From 2ebfd84caf18eac54900120bd0525bf86cdfee68 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Thu, 29 Aug 2024 12:13:27 +0200
Subject: [PATCH] OZG-6254 OZG-6484 pvog routing add network policy ports

---
 src/main/helm/templates/network_policy.yaml             | 3 +++
 src/test/helm/network_policy_test.yaml                  | 3 +++
 xta-adapter/src/main/helm/templates/network_policy.yaml | 3 +++
 xta-adapter/src/test/helm/network_policy_test.yaml      | 3 +++
 4 files changed, 12 insertions(+)

diff --git a/src/main/helm/templates/network_policy.yaml b/src/main/helm/templates/network_policy.yaml
index 9436a1d80..3a2045292 100644
--- a/src/main/helm/templates/network_policy.yaml
+++ b/src/main/helm/templates/network_policy.yaml
@@ -68,6 +68,9 @@ spec:
       podSelector: 
         matchLabels:
           component: zufi-server
+    ports:
+      - port: 9090
+        protocol: TCP
 {{- end }}
 
 {{- end }} 
\ No newline at end of file
diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml
index 7ab7a6663..94e663a87 100644
--- a/src/test/helm/network_policy_test.yaml
+++ b/src/test/helm/network_policy_test.yaml
@@ -145,6 +145,9 @@ tests:
             podSelector: 
               matchLabels:
                 component: zufi-server
+          ports:
+          - port: 9090
+            protocol: TCP
 
   - it: should throw error when zufi is enabled but zufi namespace not set
     set:
diff --git a/xta-adapter/src/main/helm/templates/network_policy.yaml b/xta-adapter/src/main/helm/templates/network_policy.yaml
index 32560c0a5..c1864c568 100644
--- a/xta-adapter/src/main/helm/templates/network_policy.yaml
+++ b/xta-adapter/src/main/helm/templates/network_policy.yaml
@@ -75,6 +75,9 @@ spec:
       podSelector: 
         matchLabels:
           component: zufi-server
+    ports:
+      - port: 9090
+        protocol: TCP
 {{- end }}
 
 {{- with (.Values.networkPolicy).additionalEgressConfigLocal }}
diff --git a/xta-adapter/src/test/helm/network_policy_test.yaml b/xta-adapter/src/test/helm/network_policy_test.yaml
index 4bfbb7c0c..290ac0f70 100644
--- a/xta-adapter/src/test/helm/network_policy_test.yaml
+++ b/xta-adapter/src/test/helm/network_policy_test.yaml
@@ -183,6 +183,9 @@ tests:
             podSelector: 
               matchLabels:
                 component: zufi-server
+          ports:
+          - port: 9090
+            protocol: TCP
 
   - it: should throw error when zufi is enabled but zufi namespace not set
     set:
-- 
GitLab