Closed gclawes closed 8 months ago
Thanks for reporting this. I've implemented a fix in v2.1.0.
Named ports do actually work for probes btw, but you will need to make sure that you have a ports
section set up in your container specification. For example: https://github.com/bjw-s/home-ops/blob/main/kubernetes/cluster-0/apps/monitoring/alertmanager/app/helmrelease.yaml#L40-L42. This would allow you to reference the http
port in your probes.
Details
What steps did you take and what happened:
Configure an app deployment with a
startupProbe
:Attempt to
helm upgrade
via terraform:It is presumed this affects all types of probes relying on a port number.
What did you expect to happen:
Helm properly patches the Deployment.
Anything else you would like to add:
Kubernetes API docs specify that
tcpSocket.port
must be:I believe quoting a numeric port results in the kubernetes API interpreting this as a named port, not a number. Because it is impossible to specify a port name in the new 2.0.0
bjw-s/common
chart (https://github.com/bjw-s/helm-charts/issues/197), numeric port numbers must always be used.[1] https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#tcpsocketaction-v1-core
Additional Information:
It would be nice if named ports worked for probes, but fixing this would be sufficient to eliminate the bug.