{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37499","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37499/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37499/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37499/events","html_url":"https://github.com/kubernetes/kubernetes/pull/37499","id":191765865,"number":37499,"title":"[WIP] [DO-NOT-MERGE] kubectl binary plugins","user":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":349530192,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-label-needed","name":"release-note-label-needed","color":"db5a64","default":false},{"id":253450978,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false},"assignees":[{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-11-25T21:16:17Z","updated_at":"2016-11-28T20:58:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37499","html_url":"https://github.com/kubernetes/kubernetes/pull/37499","diff_url":"https://github.com/kubernetes/kubernetes/pull/37499.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/37499.patch"},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md\r\n2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md\r\n3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\n\r\nIntroduces the ability to extend `kubectl` by adding third-party plugins that will be exposed through `kubectl`.\r\n\r\nPlugins are executable commands written in any language. To be included as a plugin, a binary or script file has to\r\n\r\n1. be located under `~/.kubectl/plugins` (TBD, other locations like `PATH` are being considered)\r\n2. be an executable\r\n3. have a name that starts with \"kubectl-\"\r\n4. provide a subcommand called \"metadata\" that outputs a JSON with the fields: `use` (at least the cmd name, optionally additional usage info), `short` (short description), `long` (optional, long description), `example` (optional, cmd examples), `tunnel` (boolean, defaults to false, if true the plugin engine will expose a proxy to the server's REST API)\r\n\r\nExample:\r\n\r\n```\r\n$ ~/.kube/plugins/kubectl-myplugin metadata\r\n{\r\n  \"use\"    : \"myplugin\",\r\n  \"short\"  : \"My plugin's short description\",\r\n  \"long\"   : \"My plugin's really LONG description\\n\\nCan take multi lines.\",\r\n  \"tunnel\" : true\r\n}\r\n```\r\n\r\nIn case the plugin declares `tunnel: true`, the plugin engine will pass the `KUBECTL_PLUGIN_API_HOST` env var when calling the plugin binary. Plugins can then access the Kube REST API in \"http://$KUBECTL_PLUGIN_API_HOST/api\" using the same context currently in use by `kubectl`.\r\n\r\nTest plugins are provided in `pkg/kubectl/plugins/examples`. Just move (or symlink) the files to `~/.kube/plugins` and test with, for example\r\n\r\n```\r\n$ kubectl -h       `#displays the plugin in the main list of commands`\r\n$ kubectl foo -h   `#help for the given command`\r\n$ kubectl foo      `#executes the plugin, will access the API`\r\n```\r\n\r\n**Which issue this PR fixes**:\r\n\r\nRelated to the discussions in https://github.com/kubernetes/kubernetes/pull/30086.\r\n\r\n**Release note**:\r\n```release-note\r\nTBD\r\n```\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/37499)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/263392046","html_url":"https://github.com/kubernetes/kubernetes/pull/37499#issuecomment-263392046","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37499","id":263392046,"user":{"login":"k8s-ci-robot","id":20407524,"avatar_url":"https://avatars.githubusercontent.com/u/20407524?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-ci-robot","html_url":"https://github.com/k8s-ci-robot","followers_url":"https://api.github.com/users/k8s-ci-robot/followers","following_url":"https://api.github.com/users/k8s-ci-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-ci-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-ci-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-ci-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-ci-robot/orgs","repos_url":"https://api.github.com/users/k8s-ci-robot/repos","events_url":"https://api.github.com/users/k8s-ci-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-ci-robot/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T20:58:21Z","updated_at":"2016-11-28T20:58:21Z","body":"Jenkins GCE e2e [**failed**](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/37499/pull-kubernetes-e2e-gce/6878/) for commit 3515f173e82520fa67b134e85dda4c850f7dbc33. [Full PR test history](http://pr-test.k8s.io/37499).\n\nThe magic incantation to run this job again is `@k8s-bot cvm gce e2e test this`. Please help us cut down flakes by linking to an [open flake issue](https://github.com/kubernetes/kubernetes/issues?q=is:issue+label:kind/flake+is:open) when you hit one in your PR."}}
{"actor":{"display_login":"k8s-ci-robot"}}