diff --git a/charts/portalmodelo/v0.5.0/templates/ingress.yaml b/charts/portalmodelo/v0.5.0/templates/ingress.yaml index e8f61fb..0484d40 100644 --- a/charts/portalmodelo/v0.5.0/templates/ingress.yaml +++ b/charts/portalmodelo/v0.5.0/templates/ingress.yaml @@ -24,6 +24,7 @@ metadata: {{- end }} {{- if contains "alb" .Values.ingress.class }} alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]' + alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}' {{- end }} {{- else }} # DO NOT USE TLS @@ -52,6 +53,12 @@ spec: - host: "{{ $hostPrefix }}.{{ $hostName }}" http: paths: + {{- if and (contains "alb" .Values.ingress.class) (.Values.ingress.tls.enabled) }} + - path: /* + backend: + serviceName: ssl-redirect + servicePort: use-annotation + {{- end }} {{- if contains "nginx" .Values.ingress.class }} - path: /(.*) {{- else }}