Hello, I've encountered a strange issue with gateway not creating any backend servers, if the backend pod/service are using named 80/tcp ports.
This results in requests returning 503s, and the haproxy.cfg in HUG pods having no server lines for that backend. Both Service and Pod listens do return 200s. Issue only seems to happen if the named http port is 80, for 8080/tcp for example, it doesn't fail to add backend servers. It also doesn't manifest if targetPort in service is using exact port instead of a name reference.
Example backend port snippet:
ports:
- containerPort: 80
name: http
protocol: TCP
- containerPort: 2111
name: metrics
protocol: TCP
Example Service snippet:
ports:
- name: api
port: 80
protocol: TCP
targetPort: http
- name: metrics
port: 2111
protocol: TCP
targetPort: metrics
HTTPRoute snippet:
spec:
hostnames:
- test.foobar.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: haproxy-gateway
namespace: haproxy-unified-gateway
rules:
- backendRefs:
- group: ""
kind: Service
name: foobar
port: 80
weight: 1
matches:
- path:
type: PathPrefix
value: /
Hello, I've encountered a strange issue with gateway not creating any backend servers, if the backend pod/service are using named 80/tcp ports.
This results in requests returning 503s, and the haproxy.cfg in HUG pods having no
serverlines for that backend. Both Service and Pod listens do return 200s. Issue only seems to happen if the namedhttpport is 80, for 8080/tcp for example, it doesn't fail to add backend servers. It also doesn't manifest iftargetPortin service is using exact port instead of a name reference.Example backend port snippet:
Example Service snippet:
HTTPRoute snippet: