From b0449a0e25f006ef06e480dbe3ec98f359a1ebe3 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Tue, 3 Dec 2024 15:24:42 +0100 Subject: [PATCH] Add dual ingress --- portal/base/drive-ingress.yml | 30 +++++++++++++++++++++++ portal/base/kustomization.yaml | 1 + portal/overlays/prod/drive-ingress.yml | 32 +++++++++++++++++++++++++ portal/overlays/prod/kustomization.yaml | 1 + portal/overlays/test/drive-ingress.yml | 32 +++++++++++++++++++++++++ portal/overlays/test/kustomization.yaml | 1 + portal/overlays/test/portal-ingress.yml | 4 ++-- 7 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 portal/base/drive-ingress.yml create mode 100644 portal/overlays/prod/drive-ingress.yml create mode 100644 portal/overlays/test/drive-ingress.yml diff --git a/portal/base/drive-ingress.yml b/portal/base/drive-ingress.yml new file mode 100644 index 0000000..0009c17 --- /dev/null +++ b/portal/base/drive-ingress.yml @@ -0,0 +1,30 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: drive-ingress + namespace: portal + annotations: + kubernetes.io/ingress.class: nginx +spec: + defaultBackend: + service: + name: portal-node + port: + number: 8080 + tls: + - hosts: + - drive.test.sunet.se + secretName: drive-tls-secret + ingressClassName: nginx + rules: + - host: drive.test.sunet.se + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: portal-node + port: + number: 8080 diff --git a/portal/base/kustomization.yaml b/portal/base/kustomization.yaml index a5f9a4d..3244632 100644 --- a/portal/base/kustomization.yaml +++ b/portal/base/kustomization.yaml @@ -1,4 +1,5 @@ resources: +- drive-ingress.yml - portal-cert-manager.yml - portal-deployment.yml - portal-ingress.yml diff --git a/portal/overlays/prod/drive-ingress.yml b/portal/overlays/prod/drive-ingress.yml new file mode 100644 index 0000000..f479358 --- /dev/null +++ b/portal/overlays/prod/drive-ingress.yml @@ -0,0 +1,32 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: drive-ingress + namespace: portal + annotations: + kubernetes.io/ingress.class: nginx + cert-manager.io/issuer: "letsencrypt" + acme.cert-manager.io/http01-edit-in-place: "true" +spec: + defaultBackend: + service: + name: portal-node + port: + number: 8080 + ingressClassName: nginx + tls: + - hosts: + - drive.sunet.se + secretName: drive-tls-secret + rules: + - host: drive.sunet.se + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: portal-node + port: + number: 8080 diff --git a/portal/overlays/prod/kustomization.yaml b/portal/overlays/prod/kustomization.yaml index 9113138..24beebd 100644 --- a/portal/overlays/prod/kustomization.yaml +++ b/portal/overlays/prod/kustomization.yaml @@ -3,5 +3,6 @@ kind: Kustomization resources: - ../../base patches: +- path: drive-ingress.yml - path: portal-ingress.yml - path: portal-deployment.yml diff --git a/portal/overlays/test/drive-ingress.yml b/portal/overlays/test/drive-ingress.yml new file mode 100644 index 0000000..fa76ae4 --- /dev/null +++ b/portal/overlays/test/drive-ingress.yml @@ -0,0 +1,32 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: drive-ingress + namespace: portal + annotations: + kubernetes.io/ingress.class: nginx + cert-manager.io/issuer: "letsencrypt" + acme.cert-manager.io/http01-edit-in-place: "true" +spec: + defaultBackend: + service: + name: portal-node + port: + number: 8080 + ingressClassName: nginx + tls: + - hosts: + - drive.test.sunet.se + secretName: drive-tls-secret + rules: + - host: drive.test.sunet.se + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: portal-node + port: + number: 8080 diff --git a/portal/overlays/test/kustomization.yaml b/portal/overlays/test/kustomization.yaml index 9113138..24beebd 100644 --- a/portal/overlays/test/kustomization.yaml +++ b/portal/overlays/test/kustomization.yaml @@ -3,5 +3,6 @@ kind: Kustomization resources: - ../../base patches: +- path: drive-ingress.yml - path: portal-ingress.yml - path: portal-deployment.yml diff --git a/portal/overlays/test/portal-ingress.yml b/portal/overlays/test/portal-ingress.yml index 48cd751..377bd63 100644 --- a/portal/overlays/test/portal-ingress.yml +++ b/portal/overlays/test/portal-ingress.yml @@ -17,10 +17,10 @@ spec: ingressClassName: nginx tls: - hosts: - - drive.test.sunet.se + - portal.drive.test.sunet.se secretName: tls-secret rules: - - host: drive.test.sunet.se + - host: portal.drive.test.sunet.se http: paths: - path: /