From bf59b2b3ce3650f00be575ae2611b112b2f381e7 Mon Sep 17 00:00:00 2001
From: Kalin Daskalov <kalin.daskalov@vereign.com>
Date: Mon, 15 Apr 2024 17:02:45 +0300
Subject: [PATCH] Update deployment configurations for swissrun agent and
 dashboard

---
 .../ci-cd/helm/templates/ingress.yaml          | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml b/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml
index 0a0fe7b7..2f3b40a3 100644
--- a/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml
+++ b/apps/agent/deployment/ci-cd/helm/templates/ingress.yaml
@@ -88,5 +88,23 @@ spec:
                 name: {{ template "app.name" . }}
                 port:
                   number: {{ .Values.hin.agent.port }}
+    {{- else if eq .Release.Namespace "swissrun" }}
+    - host: {{ .Values.ingress.frontendDomain }}
+      http:
+        paths:
+          - path: /swissrun(/|$)(.*)
+            pathType: Prefix
+            backend:
+              service:
+                name: {{ template "app.name" . }}
+                port:
+                  number: {{ .Values.service.port1 }}
+          - path: /api-swissrun-agent(/|$)(.*)
+            pathType: Prefix
+            backend:
+              service:
+                name: {{ template "app.name" . }}
+                port:
+                  number: {{ .Values.swissrun.agent.port }}
     {{- end }}
 {{- end }}
-- 
GitLab