kubernetes-sigs / kubernetes-sigs/node-readiness-controller
[BUG] Helm chart liveness and readiness probes hardcode port 8081, ignoring healthProbeBindAddress
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 164
- Forks
- 75
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 13
Description
What happened?
In charts/node-readiness-controller/values.yaml, healthProbeBindAddress: ":8081" is exposed as a configurable value, and templates/deployment.yaml passes --health-probe-bind-address={{ .Values.healthProbeBindAddress }} to /manager.
However, in templates/deployment.yaml, the container port and probe ports are hardcoded to 8081:
ports[0].containerPortis hardcoded to8081.livenessProbe.httpGet.portis hardcoded to8081.readinessProbe.httpGet.portis hardcoded to8081.
When a user overrides healthProbeBindAddress (such as healthProbeBindAddress: ":9090" or "0.0.0.0:8082" to avoid port collisions on shared networks), the controller manager listens on :9090, but kubelet probes port 8081. Because nothing is listening on 8081, the probes fail with connection refused. The controller is never marked ready, and after the failure threshold kubelet kills and restarts the container into a CrashLoopBackOff.
In addition, lines 77-84 in templates/deployment.yaml have extra indentation under ports:.
Steps to Reproduce
- Render
deployment.yamlwith a custom probe bind address:
helm template test-nrc charts/node-readiness-controller \
--set healthProbeBindAddress=":9090" \
-s templates/deployment.yaml
- Check the rendered arguments vs probe definitions:
args:
- --health-probe-bind-address=:9090
ports:
- name: http
containerPort: 8081
livenessProbe:
httpGet:
path: /healthz
port: 8081
readinessProbe:
httpGet:
path: /readyz
port: 8081
Expected Behavior
The container port and probe ports should derive their port from healthProbeBindAddress (e.g. parsing the port via regex or using named port http with matching containerPort), so changing healthProbeBindAddress keeps probes pointed at the active probe port.
Controller Version / Image Tag
main (commit ca2acdc)
Kubernetes Version
Client Version: v1.32.0
Controller Logs
Liveness probe failed: Get "http://10.244.1.5:8081/healthz": dial tcp 10.244.1.5:8081: connect: connection refused
Readiness probe failed: Get "http://10.244.1.5:8081/readyz": dial tcp 10.244.1.5:8081: connect: connection refused
Additional Environment Details
Can submit a PR with the template adjustment and test coverage in charts/node-readiness-controller/tests/deployment_test.yaml.
AI Tools Usage
- AI tools were used (complete below)
How They Were Used
Used Antigravity IDE to inspect helm templates, verify rendered output with custom healthProbeBindAddress values, and prepare the issue description.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with charts/node-readiness-controller/templates/deployment.yaml and render it using the issue's helm template command with a custom healthProbeBindAddress. Check charts/node-readiness-controller/tests/deployment_test.yaml for existing coverage. Done means the rendered container port and both probe ports follow the configured health probe address, the indentation is corrected, and the deployment tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100