-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Allow capture_all
to be passed to stream()
#2302
Comments
Hi, does neither of the approaches here work for you? https://github.com/kubernetes-client/python/blob/master/examples/pod_exec.py You can either exec with _preload_content=False or continuously read from the stream response. |
Hi @ofrzeta, thanks so much for your quick response! Those examples have indeed been very helpful. However, I have already set My only niggle is that all this stdout data builds up in Apologies if I've misunderstood what you were getting at! |
Correction: Calling |
/assign |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
What is the feature and why do you need it:
I'd like to be able to set
capture_all=False
when making astream(client.connect_get_namespaced_pod_exec, ...)
call.capture_all
is a parameter which yourWSClient
initialiser accepts (source).I sometimes stream large amounts of data over stdout, something like this:
I want to avoid storing all the stdout in memory at any given point. At present, unless I do
ws_client.read_all()
inside my loop, all the stdout+stderr builds up inWSClient._all
.Describe the solution you'd like to see:
The easiest approach looks to be: adapt the
_websocket_request()
function (source) topop()
capture_all
fromkwargs
like is already done withbinary
.Apologies if I'm missing a trick here and thanks for the invaluable library!
The text was updated successfully, but these errors were encountered: