From 30c57d724e8bb14c7fd8aa98f5568606be1a946a Mon Sep 17 00:00:00 2001
From: Nico Poegel <nico_benjamin.poegel@student.reutlingen-university.de>
Date: Wed, 22 Feb 2023 13:17:37 +0100
Subject: [PATCH] added routing rules for the myaktion ingress route.

---
 .../ingress-route/myaktion-ingress-route.yml  | 25 ++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/helm-msa/templates/ingress-route/myaktion-ingress-route.yml b/helm-msa/templates/ingress-route/myaktion-ingress-route.yml
index 83f4b77..964f6b0 100644
--- a/helm-msa/templates/ingress-route/myaktion-ingress-route.yml
+++ b/helm-msa/templates/ingress-route/myaktion-ingress-route.yml
@@ -9,12 +9,35 @@ metadata:
 spec:
   routes:
   - kind: Rule
-    match: PathPrefix(`/campaigns`)
+    match: Path(`/campaigns/[0-9]+/dontations`) &&  Method(`POST`)
     services:
     - kind: Service
       name: myaktion-service
       namespace: default
       port: 8080
+
+  - kind: Rule
+    match: Path(`/campaigns/[0-9]+/dontations`) &&  Method(`GET`)
+    middlewares:
+    - name: fw-auth-mw
+      namespace: default
+    services:
+    - kind: Service
+      name: myaktion-service
+      namespace: default
+      port: 8080
+
+  - kind: Rule
+    match: Path(`/campaigns`) || Path(`/campaigns/[0-9]+`)
+    middlewares:
+    - name: fw-auth-mw
+      namespace: default
+    services:
+    - kind: Service
+      name: myaktion-service
+      namespace: default
+      port: 8080
+
   - kind: Rule
     match: PathPrefix(`/monitor.html`)
     services:
-- 
GitLab