Skip to content

Add simpler Exec methods #271

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

Merged
merged 1 commit into from
Apr 1, 2019
Merged

Add simpler Exec methods #271

merged 1 commit into from
Apr 1, 2019

Conversation

qmfrederik
Copy link
Contributor

The Kubernetes API currently has a WebSocketNamespacedPodExecAsync method, which gets you a WebSocket, but doesn't give you any clues as how to use it.

This PR adds a new NamespacedPodExecAsync method which:

  • Lets you pass a callback which can process the stdin/stdout/stderr streams
  • Supports the Kubernetes error stream, from which you can read the process exit code

To simplify testing, I also extracted an IStreamDemuxer interface which helps you mock the StreamDemuxer class.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 25, 2019
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 25, 2019
@brendandburns brendandburns reopened this Mar 30, 2019
@brendandburns
Copy link
Contributor

@qmfrederik can you try rebasing this PR to re-trigger CI?

Thanks!

@tg123
Copy link
Member

tg123 commented Mar 30, 2019

@brendanburns @qmfrederik there is a button to rerun the build again.
however this failure is due to resharp ran more than 1 hour
anyway to apply more credit from azure team?

@brendandburns
Copy link
Contributor

/lgtm
/approve

I'll looking into getting us some build credits.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, qmfrederik

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

The pull request process is described here

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2019
@k8s-ci-robot k8s-ci-robot merged commit 466e339 into kubernetes-client:master Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants