From 0619e3d7f432c8cc9cbd9ca44852c79e308653ac Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 30 Jul 2024 19:09:41 +0200 Subject: [PATCH] Fix ingress forward both 80 and 443 ports to tenant clusters (#243) --- packages/apps/kubernetes/Chart.yaml | 2 +- .../apps/kubernetes/templates/ingress.yaml | 19 +++++++++---------- packages/apps/versions_map | 3 ++- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/apps/kubernetes/Chart.yaml b/packages/apps/kubernetes/Chart.yaml index af3ce9d1..5b12e8d6 100644 --- a/packages/apps/kubernetes/Chart.yaml +++ b/packages/apps/kubernetes/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.8.0 +version: 0.8.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/kubernetes/templates/ingress.yaml b/packages/apps/kubernetes/templates/ingress.yaml index 622b46ed..e1458e77 100644 --- a/packages/apps/kubernetes/templates/ingress.yaml +++ b/packages/apps/kubernetes/templates/ingress.yaml @@ -7,16 +7,15 @@ kind: Ingress metadata: name: {{ .Release.Name }}-ingress-nginx annotations: - nginx.ingress.kubernetes.io/ssl-redirect: "false" - nginx.ingress.kubernetes.io/ssl-passthrough: "true" - nginx.ingress.kubernetes.io/backend-protocol: "AUTO_HTTP" + nginx.ingress.kubernetes.io/backend-protocol: AUTO_HTTP nginx.ingress.kubernetes.io/configuration-snippet: | - set $proxy_upstream_name "{{ .Release.Namespace }}-{{ .Release.Name }}-ingress-nginx-80"; - if ($scheme = https) { - set $proxy_upstream_name "{{ .Release.Namespace }}-{{ .Release.Name }}-ingress-nginx-443"; - set $service_port 443; + if ($scheme = http) { + set $proxy_upstream_name "tenant-root-kubernetes-infra-ingress-nginx-80"; + set $proxy_host $proxy_upstream_name; + set $service_port 80; } - set $proxy_host $proxy_upstream_name; + nginx.ingress.kubernetes.io/ssl-passthrough: "true" + nginx.ingress.kubernetes.io/ssl-redirect: "false" spec: ingressClassName: "{{ $ingress }}" rules: @@ -30,14 +29,14 @@ spec: service: name: {{ $.Release.Name }}-ingress-nginx port: - number: 80 + number: 443 - path: / pathType: ImplementationSpecific backend: service: name: {{ $.Release.Name }}-ingress-nginx port: - number: 443 + number: 80 {{- end }} --- apiVersion: v1 diff --git a/packages/apps/versions_map b/packages/apps/versions_map index a76e6701..49907a64 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -15,7 +15,8 @@ kubernetes 0.4.0 6cae6ce8 kubernetes 0.5.0 6bd2d455 kubernetes 0.6.0 4cbc8a2c kubernetes 0.7.0 ceefae03 -kubernetes 0.8.0 HEAD +kubernetes 0.8.0 ac11056e +kubernetes 0.8.1 HEAD mysql 0.1.0 f642698 mysql 0.2.0 8b975ff0 mysql 0.3.0 HEAD