# Target services should be type ClusterIP
# See https://docs.microsoft.com/en-us/azure/aks/http-application-routing
apiVersion: networking.k8s.io/v1
# apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: addon-ingress
  annotations:
    # Requires http_application_routing addon
    kubernetes.io/ingress.class: addon-http-application-routing
    # nginx.ingress.kubernetes.io/ssl-redirect: "false"
    # nginx.ingress.kubernetes.io/use-regex: "true"
    # nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  defaultBackend:
    service:
      name: airflow-web-service
      port: 
        number: 8080    
  rules:
    - host: airflow.6c5afb2021e841938fec.eastus.aksapp.io
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: airflow-web-service
              port: 
                number: 8080
    - host: celery.6c5afb2021e841938fec.eastus.aksapp.io
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: airflow-web-service
              port: 
                number: 5555
