From 6b37bfba2bca57d09a7623c025f7739a1512b3ac Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Wed, 20 Mar 2024 13:33:30 +0100
Subject: [PATCH] OZG-5238 Put egress to mognodb back in network_policy

---
 src/main/helm/templates/network_policy.yaml | 14 +++++++-------
 src/test/helm/network_policy_test.yaml      | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/main/helm/templates/network_policy.yaml b/src/main/helm/templates/network_policy.yaml
index b8c86d9c..efe20f52 100644
--- a/src/main/helm/templates/network_policy.yaml
+++ b/src/main/helm/templates/network_policy.yaml
@@ -18,13 +18,13 @@ spec:
 {{ toYaml . | indent 2 }}
 {{- end }}
   egress:
-    # - to:
-    #   - podSelector:
-    #       matchLabels:
-    #         component: ozgcloud-mongodb
-    #   ports:
-    #     - port: 27017
-    #       protocol: TCP
+    - to:
+      - podSelector:
+          matchLabels:
+            component: ozgcloud-mongodb
+      ports:
+        - port: 27017
+          protocol: TCP
     # public keycloak ip
     - to:
       - ipBlock:
diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml
index fa732251..48a5811f 100644
--- a/src/test/helm/network_policy_test.yaml
+++ b/src/test/helm/network_policy_test.yaml
@@ -67,13 +67,13 @@ tests:
               - ports:
                   - port: 8080
             egress:
-              # - to:
-              #     - podSelector:
-              #         matchLabels:
-              #           component: ozgcloud-mongodb
-              #   ports:
-              #     - port: 27017
-              #       protocol: TCP
+              - to:
+                  - podSelector:
+                      matchLabels:
+                        component: ozgcloud-mongodb
+                ports:
+                  - port: 27017
+                    protocol: TCP
               # public keycloak ip
               - to:
                   - ipBlock:
-- 
GitLab