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 kubectl debug alpha command #88004

Merged
merged 1 commit into from Mar 5, 2020
Merged

Add kubectl debug alpha command #88004

merged 1 commit into from Mar 5, 2020

Conversation

@verb
Copy link
Contributor

verb commented Feb 10, 2020

This first version of kubectl alpha debug is an import of the existing kubectl-debug plugin, which supports adding ephemeral containers to running pods. This attempts to follow patterns used by other kubectl commands such as run, exec and scale.

What type of PR is this?
/kind feature
/priority important-longterm
/sig cli

What this PR does / why we need it: This is the first of a series of PRs to implement kubernetes/enhancements#1441

Which issue(s) this PR fixes:

Fixes #45922

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`kubectl` now contains a `kubectl alpha debug` command. This command allows attaching an ephemeral container to a running pod for the purposes of debugging.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/20190805-kubectl-debug.md
@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Feb 11, 2020

/retest

1 similar comment
@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Feb 11, 2020

/retest

@verb verb marked this pull request as ready for review Feb 11, 2020
@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Feb 11, 2020

Close enough. I'm pretty certain the timeouts on the e2e gce test are unrelated.

/assign @soltysh

Note for reviewers: My goal is to get an alpha command merged so that we can begin iterating. I'm new to changing kubectl and feel like I have a shaky grasp on convention. Please point out where I've deviated from convention and request refactors if appropriate. Thanks!

@verb verb changed the title WIP: Add kubectl debug alpha command Add kubectl debug alpha command Feb 11, 2020
@apelisse

This comment has been minimized.

Copy link
Member

apelisse commented Feb 12, 2020

/lgtm

@apelisse

This comment has been minimized.

Copy link
Member

apelisse commented Feb 12, 2020

I'll let @soltysh approve to get an extra pair of eyes.

@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Feb 25, 2020

/retest

Copy link
Contributor

soltysh left a comment

A few nits but we can definitely get this in as a good starter

@k8s-ci-robot k8s-ci-robot removed the lgtm label Feb 28, 2020
@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Feb 28, 2020

@soltysh PTAL. Let me know if I should squash.

@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Feb 28, 2020

/retest

staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go Outdated Show resolved Hide resolved
@verb verb force-pushed the verb:cli-debug branch from f65339e to 394b030 Mar 3, 2020
@verb

This comment has been minimized.

Copy link
Contributor Author

verb commented Mar 4, 2020

/retest

This first version of `kubectl alpha debug` is an import of the existing
kubectl-debug plugin, which supports adding ephemeral containers to
running pods. This attempts to follow patterns used by other kubectl
commands such as run, exec and scale.
@verb verb force-pushed the verb:cli-debug branch from 394b030 to e5b6559 Mar 4, 2020
@soltysh
soltysh approved these changes Mar 5, 2020
Copy link
Contributor

soltysh left a comment

/lgtm
/approve
/milestone v1.18
Thanks for your patience! We'll iterate further as we go 😉

@k8s-ci-robot k8s-ci-robot added the lgtm label Mar 5, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Mar 5, 2020
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Mar 5, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: soltysh, verb

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 merged commit 55bfdc6 into kubernetes:master Mar 5, 2020
16 checks passed
16 checks passed
cla/linuxfoundation verb authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kind Job succeeded.
Details
pull-kubernetes-e2e-kind-ipv6 Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.