From d67f1f0935c38c5cf8a9dd17ab675a0d1e829a24 Mon Sep 17 00:00:00 2001
From: Paolo Brasolin <paolo.brasolin@eurac.edu>
Date: Mon, 28 Feb 2022 17:08:17 +0100
Subject: [PATCH] feat: #be clenup k8s ingress patches

---
 backend/kustomize/overlays/dev/kustomization.yaml     | 11 +----------
 .../overlays/dev/webserver.ingress.patch.yaml         |  9 +++++++++
 backend/kustomize/overlays/stg/kustomization.yaml     | 11 +----------
 .../overlays/stg/webserver.ingress.patch.yaml         |  9 +++++++++
 4 files changed, 20 insertions(+), 20 deletions(-)
 create mode 100644 backend/kustomize/overlays/dev/webserver.ingress.patch.yaml
 create mode 100644 backend/kustomize/overlays/stg/webserver.ingress.patch.yaml

diff --git a/backend/kustomize/overlays/dev/kustomization.yaml b/backend/kustomize/overlays/dev/kustomization.yaml
index 21a8272..2770bae 100644
--- a/backend/kustomize/overlays/dev/kustomization.yaml
+++ b/backend/kustomize/overlays/dev/kustomization.yaml
@@ -27,13 +27,4 @@ patchesJSON6902:
       version: v1
       kind: Ingress
       name: oetzi-webserver-ingress
-    patch: |-
-      - op: replace
-        path: /metadata/annotations/nginx.ingress.kubernetes.io~1rewrite-target
-        value: /$2
-      - op: replace
-        path: /spec/rules/0/host
-        value: minikube.localhost
-      - op: replace
-        path: /spec/rules/0/http/paths/0/path
-        value: /oetzi(/|$)(.*)
+    patch: webserver.ingress.patch.yaml
diff --git a/backend/kustomize/overlays/dev/webserver.ingress.patch.yaml b/backend/kustomize/overlays/dev/webserver.ingress.patch.yaml
new file mode 100644
index 0000000..f01784c
--- /dev/null
+++ b/backend/kustomize/overlays/dev/webserver.ingress.patch.yaml
@@ -0,0 +1,9 @@
+- op: replace
+  path: /metadata/annotations/nginx.ingress.kubernetes.io~1rewrite-target
+  value: /$2
+- op: replace
+  path: /spec/rules/0/host
+  value: minikube.localhost
+- op: replace
+  path: /spec/rules/0/http/paths/0/path
+  value: /oetzi(/|$)(.*)
diff --git a/backend/kustomize/overlays/stg/kustomization.yaml b/backend/kustomize/overlays/stg/kustomization.yaml
index 527dde5..529beb7 100644
--- a/backend/kustomize/overlays/stg/kustomization.yaml
+++ b/backend/kustomize/overlays/stg/kustomization.yaml
@@ -28,13 +28,4 @@ patchesJSON6902:
       version: v1
       kind: Ingress
       name: oetzi-webserver-ingress
-    patch: |-
-      - op: replace
-        path: /metadata/annotations/nginx.ingress.kubernetes.io~1rewrite-target
-        value: /$2
-      - op: replace
-        path: /spec/rules/0/host
-        value: kommul-dev.eurac.edu
-      - op: replace
-        path: /spec/rules/0/http/paths/0/path
-        value: /oetzi(/|$)(.*)
+    patch: webserver.ingress.patch.yaml
diff --git a/backend/kustomize/overlays/stg/webserver.ingress.patch.yaml b/backend/kustomize/overlays/stg/webserver.ingress.patch.yaml
new file mode 100644
index 0000000..83d2124
--- /dev/null
+++ b/backend/kustomize/overlays/stg/webserver.ingress.patch.yaml
@@ -0,0 +1,9 @@
+- op: replace
+  path: /metadata/annotations/nginx.ingress.kubernetes.io~1rewrite-target
+  value: /$2
+- op: replace
+  path: /spec/rules/0/host
+  value: kommul-dev.eurac.edu
+- op: replace
+  path: /spec/rules/0/http/paths/0/path
+  value: /oetzi(/|$)(.*)
-- 
GitLab