apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: front-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/certificate-arn: <YOUR-CERTIFICATE-ARN>
    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"}}'
    alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-2-Ext-2018-06
    alb.ingress.kubernetes.io/load-balancer-attributes: >
      idle_timeout.timeout_seconds=301,
      routing.http2.enabled=false,
      access_logs.s3.enabled=true,
      access_logs.s3.bucket=YOUR-LOGS-S3-BUCKET,
      access_logs.s3.prefix=YOUR-LOGS-PREFIX
spec:
  rules:
    - host: <YOUR-TOWER-HOST-NAME>
      http:
        paths:
          - path: /*
            pathType: ImplementationSpecific
            backend:
              service:
                name: ssl-redirect
                port:
                  name: use-annotation
          - path: /*
            pathType: ImplementationSpecific
            backend:
              service:
                name: frontend
                port:
                  number: 80

# Uncomment the host section below to enable Data Studios. Replace <YOUR-TOWER-HOST-NAME> with the base domain of your Platform installation. See [Data Studios configuration](https://docs.seqera.io/platform/24.1.1/enterprise/data-studios) for more information.
#    - host: "*.<YOUR-TOWER-HOST-NAME>"
#      http:
#        paths:
#          - backend:
#              service:
#                name: connect-proxy
#                port:
#                  number: 80
#            pathType: ImplementationSpecific
#            path: /*