Skip to content

Commit

Permalink
Fix ingress forward both 80 and 443 ports to tenant clusters (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps committed Jul 30, 2024
1 parent 23b2521 commit 0619e3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/apps/kubernetes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 9 additions & 10 deletions packages/apps/kubernetes/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion packages/apps/versions_map
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0619e3d

Please sign in to comment.