Consul Ingress Gateway Name

When Deploying Consul Ingress gateway in Kubernetes does the Name in the consul configuration (hcl file) need to match the name of the k8s service (minus the prefix)? Or can they be complete different?

$ cat myingress.hcl
Kind = "ingress-gateway"
# does the following line need to match kubernetes service
Name = "ingress-gateway"
Listeners = [
  Port = 8080
  ......
]

$ kubectl get services
NAME                                            TYPE               CLUSTER-IP      EXTERNAL-IP   PORT(S) 
consul-ingress-gateway             <whatever>  <blah>                <blah>             8080/TCP,8443/TCP
......

Hey @mdschneider,

Good question! Yes, although to clarify, the name of your ingress gateway config entry has to match the name of the ingress gateway service in Consul rather than Kubernetes. That is how Consul knows which service to apply this configuration to.

Because of how we set it up in the Helm chart, the service name in Consul will be the name of the Kubernetes service minus the prefix, like you said. The name of the service in Consul comes from the ingressGateways.gateways[i].name Helm value.

Hope this helps!