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

WIP: Update Kubernetes API to support Debug Containers #46243

Closed
wants to merge 2 commits into from

Conversation

verb
Copy link
Contributor

@verb verb commented May 22, 2017

What this PR does / why we need it: Debug Containers were proposed in kubernetes/community#649 and are to be implemented mostly in the kubelet. This change proposes changes to the Kubernetes API to allow creating a Debug Container via the existing exec subresource.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

NONE

Dependencies:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 22, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: verb
We suggest the following additional approver: lavalamp

Assign the PR to them by writing /assign @lavalamp in a comment when ready.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/new-api size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels May 22, 2017
loc := &url.URL{
Scheme: nodeInfo.Scheme,
Host: net.JoinHostPort(nodeInfo.Hostname, nodeInfo.Port),
Path: fmt.Sprintf("/podDebug/%s/%s/%s", pod.Namespace, pod.Name, opts.Container),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poddebug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the other two word kubelet paths use mixed case (e.g. portForward, containerLogs), but then there's "runningpods" so perhaps that's an old convention.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we want to stop using camel cased paths

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks. I've made the change and it will appear when I push a rebase

@verb
Copy link
Contributor Author

verb commented May 23, 2017

One thing I wanted to ask about: the kubelet needs a v1.Container to create the debug container. I think it would be ideal if the client could post a v1.Container to the /debug subresource rather than passing individual fields via http parameters. That's possible to do prior to upgrading the connection, but it doesn't seem well supported by the api machinery and I'm not sure how well that fits in kubernetes API conventions. Advice would be much appreciated.

@verb verb changed the title Update Kubernetes API to support Debug Containers WIP: Update Kubernetes API to support Debug Containers May 25, 2017
@xiangpengzhao xiangpengzhao mentioned this pull request May 30, 2017
@verb
Copy link
Contributor Author

verb commented Aug 14, 2017

Update: I'm still working on this. I've reworked the API and will update this PR in the next week or so.

@verb
Copy link
Contributor Author

verb commented Aug 16, 2017

@lavalamp is unavailable for a bit so I'm going to request a new reviewer.

/unassign @lavalamp

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 23, 2017
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 12, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 12, 2017
@k8s-ci-robot
Copy link
Contributor

@verb: Your pull request title starts with "WIP", so the do-not-merge/work-in-progress label will be added.

This label will ensure that your pull request will not be merged. Remove the prefix from your pull request title to trigger the removal of the label and allow for your pull request to be merged.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 12, 2017
@verb
Copy link
Contributor Author

verb commented Sep 12, 2017

/sig node

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Sep 12, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Sep 13, 2017

@verb: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel 54dfc6dbd271378fc6eb0a8d7d1598b23de7a7c1 link /test pull-kubernetes-bazel
pull-kubernetes-e2e-gce-bazel d38b622 link /test pull-kubernetes-e2e-gce-bazel

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot
Copy link

@verb PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 23, 2017
@derekwaynecarr
Copy link
Member

this work will require us to implement this first, correct?

kubernetes/community#1048

will we implement the above before this pr lands?

@verb
Copy link
Contributor Author

verb commented Sep 29, 2017

@derekwaynecarr It's not necessary because the features are only loosely coupled. The code I already have uses the existing, kubelet-flagged shared PID support.

We can order them if you'd like, though. I consider Shared PID more urgent, but I'm not sure how long the review of kubernetes/community#1048 will take.

@k8s-github-robot
Copy link

This PR hasn't been active in 60 days. It will be closed in 29 days (Dec 28, 2017).

cc @saad-ali @verb

You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days

@verb
Copy link
Contributor Author

verb commented Dec 22, 2017

We're not going to get consensus here any time soon. Will reopen in the future if we figure things out.

@verb verb closed this Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants