Skip to content
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 PortForward.run_forever(), add docs examples and fix sync API bug #219

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

jacobtomlinson
Copy link
Member

Added a run_forever() method to the PortForward object to indefinitely block and serve the port forward.

from kr8s.objects import Pod

pod = Pod.get("my-pod")
pod.portforward(1234, local_port=5678).run_forever()

Also added some documentation examples which closes #217 and a couple of fixes to the way the loop is handles which closes #218.

@github-actions github-actions bot added documentation Improvements or additions to documentation kr8s labels Nov 28, 2023
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a5b2b11) 95.06% compared to head (0085570) 94.99%.
Report is 1 commits behind head on main.

Files Patch % Lines
kr8s/_portforward.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
- Coverage   95.06%   94.99%   -0.07%     
==========================================
  Files          26       26              
  Lines        2575     2579       +4     
==========================================
+ Hits         2448     2450       +2     
- Misses        127      129       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacobtomlinson jacobtomlinson merged commit 0280954 into kr8s-org:main Nov 28, 2023
8 of 9 checks passed
@jacobtomlinson jacobtomlinson deleted the pf-docs-run-forever branch November 28, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation kr8s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pod port forward sync API does not work in IPython Port forwarding not well documented
1 participant