Specifying a service's port name instead of number does not work #211
Open
Description
I just installed a Helm chart (the Element OnPrem server to be precise) which installs the following Ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: first-element-deployment-synapse
namespace: element-onprem
spec:
rules:
- host: ***MASKED***
http:
paths:
- backend:
service:
name: first-element-deployment-synapse-haproxy
port:
name: haproxy-http
path: /_matrix
pathType: Prefix
- backend:
service:
name: first-element-deployment-synapse-haproxy
port:
name: haproxy-http
path: /_synapse
pathType: Prefix
Note that the service port is referenced by name and not by number. This breaks when using Caddy Ingress, which I figured would be due to the following line:
Basically it just returns port 0
here because the port number should be resolved by name instead of directly using the number.
@mavimo Would you be open to a PR to fix this?
Metadata
Assignees
Labels
No labels