Skip to content

backend: portforward: Fix context key to match rest of backend#6109

Open
r0hansaxena wants to merge 1 commit into
kubernetes-sigs:mainfrom
r0hansaxena:backend/portforward-context-key
Open

backend: portforward: Fix context key to match rest of backend#6109
r0hansaxena wants to merge 1 commit into
kubernetes-sigs:mainfrom
r0hansaxena:backend/portforward-context-key

Conversation

@r0hansaxena

Copy link
Copy Markdown
Contributor

Summary

Port forwarding broke in 0.43 with "Unreachable" for some clusters. The port forward handler builds the cluster lookup key differently from the rest of the backend, so in some setups it looks for the cluster under a key that was never stored and fails.

This PR changes the port forward handlers to use the same key logic as the rest of the backend instead of building the key themselves.

Related Issue

Fixes #6069

Steps to Test

  1. Use a cluster setup where port forwarding currently fails with "Unreachable"
  2. Try to port forward a pod or service

I reproduced the issue locally and confirmed the same request fails before the change and succeeds after.

Notes for the Reviewer

The existing port forward tests were updated for the new function signatures.

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: r0hansaxena
Once this PR has been reviewed and has the lgtm label, please assign joaquimrocha for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 20, 2026
@r0hansaxena

Copy link
Copy Markdown
Contributor Author

I'll address the failing check

@r0hansaxena r0hansaxena force-pushed the backend/portforward-context-key branch from 2376aec to 14377f3 Compare June 20, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.43 broke port forwarding

2 participants