-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Which project are you reporting a bug for?
kr8s
What happened?
While investigating #569 I noticed a hang locally when running a sync port forward context manager. It seems to take a long time to exit the context manager.
# Create web server Pod
kubectl run webserver --image nginx --port 80
kubectl expose po webserverimport kr8s
import requests
import time
[svc] = kr8s.get("svc", "webserver")
start = time.time()
with svc.portforward(remote_port=80, local_port="auto") as local_port:
print(f"After enter: {time.time() - start:.1}s")
resp = requests.get(f"http://localhost:{local_port}/")
print(f"After rerquest: {time.time() - start:.1}s")
print(f"After exit: {time.time() - start:.1}s")After enter: 0.001s
After rerquest: 0.04s
After exit: 70s
# Clean up
kubectl delete svc/webserver po/webserverAnything else?
No response
samof76
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed