fix(builder): honor service.nodePort for restapi, controller, accounting#183
fix(builder): honor service.nodePort for restapi, controller, accounting#183martbhell wants to merge 1 commit into
Conversation
The chart documents `restapi.service.nodePort`, `controller.service.nodePort`, and `accounting.service.nodePort` (helm/slurm/values.yaml lines 297, 397, 509), but the corresponding ServicePort builders never set NodePort. Setting the field in helm values made it through to the CR's spec.service.nodePort, but the operator silently dropped it when building the Service — kube-apiserver then auto-allocated a random port, and the field was effectively a no-op. Mirror the pattern already used by loginbuilder/login_service.go: pass spec.NodePort through to the corev1.ServicePort. Add a focused unit test per builder that asserts the propagation. loginbuilder/login_service.go already has this; loginsets.slinky.service.nodePort in helm values has always worked. Signed-off-by: Johan Guldmyr <johan@datacrunch.io>
|
Good morning @martbhell. Thanks for the contribution, I will review this. Just a note for future reference, we never modify the CHANGELOGs directly, we generally use a Best, |
|
Thanks! As a note, this suggestion came from me using Claude code to access slurmrestd api from a node (on the same L2/subnet as a slinky) that hasnt joined the k8s cluster. |
|
Good morning @martbhell, I've modified your commit to only make changes to the Best, |
The chart documents
restapi.service.nodePort,controller.service.nodePort, andaccounting.service.nodePort(helm/slurm/values.yaml lines 297, 397, 509), but the corresponding ServicePort builders never set NodePort. Setting the field in helm values made it through to the CR's spec.service.nodePort, but the operator silently dropped it when building the Service — kube-apiserver then auto-allocated a random port, and the field was effectively a no-op.Mirror the pattern already used by loginbuilder/login_service.go: pass spec.NodePort through to the corev1.ServicePort. Add a focused unit test per builder that asserts the propagation.
loginbuilder/login_service.go already has this; loginsets.slinky.service.nodePort in helm values has always worked.
Summary
Checklist
CONTRIBUTING.md
and the
Code of Conduct.
Breaking Changes
Testing Notes
Additional Context