-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for automatic port-forwarding in Hubble CLI #35483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for automatic port-forwarding in Hubble CLI #35483
Conversation
1394e17
to
3a0885f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Mostly nitpicks so nothing blocking and the functional changes are good. Thanks for keeping things broken into multiple commits.
/test |
@chancez i guess we can remove |
0983d85
to
24a858c
Compare
Fixed the go mod/vendor check with my latest force-push |
/test |
The hubble-cli compile test started failing on 32bit platform after the latest rebase. Opened a PR for a fix attempt. |
…dutils Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Add a new type that provides helper methods for kubernetes port-forwarding which is not linked to the cilium-cli k8s client to allow re-use. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Add a new helper method that finds the best candidate pod for port-forwrding using a service reference. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Add the capability to connect to hubble relay by creating a port-forward to the appropriate pod similar to manually spawning a new process with 'cilium hubble port-forward'. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Replace kubectl-based port-forwarding with a native implementation inspired by the kubectl port-forward cmd introduced by the PortForwarder helper type. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Head branch was pushed to by a user without write access
24a858c
to
771193d
Compare
Fix PR has been merged and I force pushed a rebase from main. @michi-covalent would you be kind enough to re-trigger tests when you can? 🥺 Thank you! |
/test |
That IPSec test is very flaky from looking at the action history. Hopefully a re-trigger will have it go through 🤞 |
Update workflow files to accommodate cilium/cilium#35483. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update workflow files to accommodate cilium/cilium#35483. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Implement automatic (opt-in) port-forwarding capability in Hubble-cli.
As proposed in #35353, this uses native port-forwarding by introducing a new high-level PortForwarder type to add automatic port-forwarding to all commands that require a GRPC connection to hubble-relay.
Fixes: #34935
This also updates hubble port-forwarding commands in cilium-cli to replace the kubectl-based implementation, but we can also do that in a different PR if desired. Added bonus is we don't need to sleep in a goroutine before opening the browser to mitigate the kubectl spawn process delay, nice.