Application Gateway Ingress Controller Multi Site listener

I need help about Application Gateway Ingress Controller. It does not set the application gateway listener to multi site when there are 2 hosts with same service name and same port.
Please let me know if I am missing anything the in this following deployment yaml:

apiVersion: extensions/v1beta1

kind: Ingress

metadata:

name: ingress-certificate

namespace: default

annotations:

kubernetes.io/ingress.class: azure/application-gateway

appgw.ingress.kubernetes.io/appgw-ssl-certificate: "test"

spec:

rules:

  • host: demo.domain.com

    http:

    paths:

    • path: /

      backend:

      serviceName: test-application

      servicePort: 80

  • host: demo-accounts.domain.com

    http:

    paths:

    • path: /

      backend:

      serviceName: test-application

      servicePort: 80

Did you ever find the answer to this? Running into the same problem. It creates multiple listeners on the same port as Basic listeners.

Yes.

Root cause:

Http Listener must specify a non-empty value for either ‘hostName’ and ‘hostNames’ property, but not both, which will cause failure. Previously, the new ‘hostNames’ property is not visible in “Portal” and that might cause confusion. Fortunately, it is lighted on Azure Portal now.

Resolution:

It is resolved after the ‘hostNames’ property is lighted on Azure Portal.

It should create multisite now as they provided the feature in portal.

@Setareh hey thanks for the info. I guess I’m a little confused about where hostNames and hostName are populated from. Within a standard ingress template, plus ApGW annotations for AGIC, I have something along the lines of:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    appgw.ingress.kubernetes.io/appgw-ssl-certificate: my-cert-name
    appgw.ingress.kubernetes.io/backend-path-prefix: /
    kubernetes.io/ingress.class: azure/application-gateway
  name: my-ingress-name
  namespace: default
spec:
  rules:
  - host: '*.myhost.com'
    http:
      paths:
      - backend:
          serviceName: my-service-name
          servicePort: http
        path: /my-service*
  - host: myhost.com
    http:
      paths:
      - backend:
          serviceName: my-service-name
          servicePort: http
        path: /my-service*

So where does an ingress config map back to these properties? Obvious thing I’m seeing is “host” but that’s different than both.

Just a little confused, any insight you have would be wonderful.

Thanks!

Dave

Sorry, reading again, you are saying these are backend properties causing the problem, and it should just be fixed? Not seeing that.

Did you find any solution for this yet? I am also trying to create multisite listeners using AGIC, but it keeps creating “basic” type listeners.

Hi, has anyone ever found a solution for this? I have recently upgraded my cluster and now using Helm 3.3, AGIC 1.20-rc3 and my ingress.yaml no longer creates a multisite listener, on Helm 2.x and rc1 of the AGIC the same ingress.yaml worked perfectly. I cannot see any annotation or find any documentation which states the type of listener now needs to be specified. I have opened an issue on GitHub https://github.com/Azure/application-gateway-kubernetes-ingress/issues/996