#Airflow is using the ALB ingress controller. Not very portable and 
#requires AWS ALB controller to be functional
#

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: airflow-ingress
  namespace: airflow
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
    alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-FS-1-2-2019-08
    alb.ingress.kubernetes.io/tags: Environment=production
    alb.ingress.kubernetes.io/target-type: 'ip'
spec:
  rules:
    - host: airflow.relevance.tools
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: airflow-web
                port:
                  number: 8080
