charts: Add multi-port support for Service and Ingress backends#5078
charts: Add multi-port support for Service and Ingress backends#5078Soli0222 wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
Signed-off-by: Soli0222 <github@str08.net>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Soli0222 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
|
Welcome @Soli0222! |
|
Hey @Soli0222 , Kindly sign the CNCF-CLA |
|
Hi @itvi-1234, I just signed the CNCF-CLA. Could you please review it? |
Summary
This PR adds multi-port support to the Helm chart so that sidecar containers added via
deployment.extraContainerscan be exposed through the same Headlamp Service and Ingress without maintaining a separate Service resource.Related Issue
Fixes #5077
Changes
service.extraServicePorts[]to append extra ports to the existing Headlamp Service (name/port/targetPort/protocol/nodePort).ingress.hosts[].paths[].backend.service.{name,port}so each Ingress path can override its backend. Whenbackendis omitted the existing behavior (default Service /service.port) is preserved, so existing values files keep working unchanged.values.yaml,values.schema.json, andREADME.mdto document both fields.extraServicePortsand multi-backend Ingress (default fallback /port.name/port.number/ templatedname).Steps to Test
bash charts/headlamp/tests/test.sh— all existing tests still pass (backward compatibility) and the two new test cases (service-extra-ports,ingress-multi-backend) pass.httpandpluginports, and the Ingress routes/pluginto port nameplugin:helm lint charts/headlamp— clean.Screenshots (if applicable)
N/A (chart-only change)
Notes for the Reviewer
containerPortentries — users wiring a sidecar viaextraContainersare expected to declare the port on the container side.httpRoute.rules) already accepts arbitrarybackendRefs, so no template change was needed there; the README notes how to combine it withextraServicePorts.ingress.hosts[].paths[].backend.service.nameis rendered throughtplso values like{{ .Release.Name }}-otherwork. Happy to drop this and treat the field as a literal string if you'd prefer to keep the trust boundary tighter.