From eacc325962138d441e73bf44c0ab1f69cd20e841 Mon Sep 17 00:00:00 2001
From: Jan Zickermann <jan.zickermann@dataport.de>
Date: Wed, 18 Dec 2024 09:32:26 +0100
Subject: [PATCH] #2 OZG-7121 helm: Add openshift route

---
 src/main/helm/templates/certificate.yaml |  1 +
 src/main/helm/templates/route.yaml       | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 src/main/helm/templates/route.yaml

diff --git a/src/main/helm/templates/certificate.yaml b/src/main/helm/templates/certificate.yaml
index 7ac0e72..76aac3a 100644
--- a/src/main/helm/templates/certificate.yaml
+++ b/src/main/helm/templates/certificate.yaml
@@ -40,4 +40,5 @@ spec:
     - key encipherment
     - key agreement
   dnsNames:
+    - "{{ .Release.Name }}-passthrough-{{ include "app.baseDomain" . }}"
     - "{{ .Release.Name }}-{{ include "app.baseDomain" . }}"
\ No newline at end of file
diff --git a/src/main/helm/templates/route.yaml b/src/main/helm/templates/route.yaml
new file mode 100644
index 0000000..0f86471
--- /dev/null
+++ b/src/main/helm/templates/route.yaml
@@ -0,0 +1,23 @@
+kind: Route
+apiVersion: route.openshift.io/v1
+metadata:
+  name: {{ .Release.Name }}-passthrough
+  namespace: by-enable-dev
+
+spec:
+  host: {{ .Release.Name }}-passthrough-{{ include "app.baseDomain" . }}
+  to:
+    kind: Service
+    name: xta-test-server
+    weight: 100
+  port:
+    targetPort: 8443
+  tls:
+    termination: passthrough
+  wildcardPolicy: None
+status:
+  ingress:
+    - host: {{ .Release.Name }}-passthrough-{{ include "app.baseDomain" . }}
+      routerName: default
+      wildcardPolicy: None
+      routerCanonicalHostname: router-default.apps.okd.dev.by.ozg-cloud.systems
-- 
GitLab