dendrite icon indicating copy to clipboard operation
dendrite copied to clipboard

Use port number instead of name for k8s service port

Open Xinayder opened this issue 1 year ago • 4 comments

I've found an issue when deploying Dendrite's Helm chart on my local cluster. The template for generating an Ingress resource tries to find the service port using a name (http), but the template that generates the Service resource, instead, identifies the resource with a port number.

According to the Kubernetes ServiceSpec, ports.targetPort can be either a number or a string; if it's the latter, it will be looked up as a named port in the pod's container ports.

Pull Request Checklist

Xinayder avatar Nov 02 '23 20:11 Xinayder

I did some more testing and it turns out that even if you set the targetPort property on the Service definition, the ingress controller won't find the pod.

However, if you set the service.port property on the ingress resource to the port number, it works. If it's set to http, it doesn't.

Xinayder avatar Nov 02 '23 23:11 Xinayder

Confirm that private signoff recieved.

InezMc avatar Nov 07 '23 08:11 InezMc

~~Still haven't received an email back from Matrix regarding my private signoff request.~~

Xinayder avatar Nov 07 '23 13:11 Xinayder

Sign-off confirmed.

Xinayder avatar Nov 10 '23 09:11 Xinayder