{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27206","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27206/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27206/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27206/events","html_url":"https://github.com/kubernetes/kubernetes/pull/27206","id":159734012,"number":27206,"title":"Add 'kubectl set resources'","user":{"login":"JacobTanenbaum","id":13948445,"avatar_url":"https://avatars.githubusercontent.com/u/13948445?v=3","gravatar_id":"","url":"https://api.github.com/users/JacobTanenbaum","html_url":"https://github.com/JacobTanenbaum","followers_url":"https://api.github.com/users/JacobTanenbaum/followers","following_url":"https://api.github.com/users/JacobTanenbaum/following{/other_user}","gists_url":"https://api.github.com/users/JacobTanenbaum/gists{/gist_id}","starred_url":"https://api.github.com/users/JacobTanenbaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacobTanenbaum/subscriptions","organizations_url":"https://api.github.com/users/JacobTanenbaum/orgs","repos_url":"https://api.github.com/users/JacobTanenbaum/repos","events_url":"https://api.github.com/users/JacobTanenbaum/events{/privacy}","received_events_url":"https://api.github.com/users/JacobTanenbaum/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/old-docs","name":"kind/old-docs","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900"}],"state":"open","locked":false,"assignee":{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars.githubusercontent.com/u/4876867?v=3","gravatar_id":"","url":"https://api.github.com/users/janetkuo","html_url":"https://github.com/janetkuo","followers_url":"https://api.github.com/users/janetkuo/followers","following_url":"https://api.github.com/users/janetkuo/following{/other_user}","gists_url":"https://api.github.com/users/janetkuo/gists{/gist_id}","starred_url":"https://api.github.com/users/janetkuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janetkuo/subscriptions","organizations_url":"https://api.github.com/users/janetkuo/orgs","repos_url":"https://api.github.com/users/janetkuo/repos","events_url":"https://api.github.com/users/janetkuo/events{/privacy}","received_events_url":"https://api.github.com/users/janetkuo/received_events","type":"User","site_admin":false},"assignees":[{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars.githubusercontent.com/u/4876867?v=3","gravatar_id":"","url":"https://api.github.com/users/janetkuo","html_url":"https://github.com/janetkuo","followers_url":"https://api.github.com/users/janetkuo/followers","following_url":"https://api.github.com/users/janetkuo/following{/other_user}","gists_url":"https://api.github.com/users/janetkuo/gists{/gist_id}","starred_url":"https://api.github.com/users/janetkuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janetkuo/subscriptions","organizations_url":"https://api.github.com/users/janetkuo/orgs","repos_url":"https://api.github.com/users/janetkuo/repos","events_url":"https://api.github.com/users/janetkuo/events{/privacy}","received_events_url":"https://api.github.com/users/janetkuo/received_events","type":"User","site_admin":false},{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":26,"created_at":"2016-06-10T22:17:36Z","updated_at":"2016-08-17T13:42:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27206","html_url":"https://github.com/kubernetes/kubernetes/pull/27206","diff_url":"https://github.com/kubernetes/kubernetes/pull/27206.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/27206.patch"},"body":"Add \"kubectl set resources\" for easier updating container memory/cpu limits/requests (for pods or resources with pod templates).\r\n\r\n**Usage**\r\n\r\n`kubectl set resources (-f FILENAME | TYPE NAME)  ([--limits=LIMITS & --requests=REQUESTS] ^ --remove)`\r\n\r\n**Examples**\r\nSet a deployments nginx container cpu limits to \"200m and memory to \"512Mi\"\r\n`kubectl set resources deployment nginx -c=nginx --limits=cpu=200m,memory=512Mi`\r\n\r\nSet the limit and requests for all containers in nginx\r\n`kubectl set resources deployment nginx --limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi`\r\n\r\nPrint the result (in yaml format) of updating nginx container limits from a local, without hitting the server\r\n`kubectl set resources -f path/to/file.yaml --limits=cpu=200m,memory=512Mi --local -o yaml`\r\n\r\nRemove limits and requests on containers in nginx\r\n`kubectl set resources deployment nginx --remove`\r\n\r\nRef: https://github.com/kubernetes/kubernetes/issues/21648\n\n<!-- Reviewable:start -->\n---\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/27206)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/240414595","html_url":"https://github.com/kubernetes/kubernetes/pull/27206#issuecomment-240414595","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27206","id":240414595,"user":{"login":"k8s-bot","id":12551979,"avatar_url":"https://avatars.githubusercontent.com/u/12551979?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-bot","html_url":"https://github.com/k8s-bot","followers_url":"https://api.github.com/users/k8s-bot/followers","following_url":"https://api.github.com/users/k8s-bot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-bot/subscriptions","organizations_url":"https://api.github.com/users/k8s-bot/orgs","repos_url":"https://api.github.com/users/k8s-bot/repos","events_url":"https://api.github.com/users/k8s-bot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-bot/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T13:42:30Z","updated_at":"2016-08-17T13:42:30Z","body":"Can one of the admins verify that this patch is reasonable to test? If so, please reply \"ok to test\".\n(Note: \"add to whitelist\" is no longer supported. Please update configurations in [kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull](https://github.com/kubernetes/test-infra/tree/master/jenkins/job-configs/kubernetes-jenkins-pull) instead.)\n\nThis message may repeat a few times in short succession due to https://github.com/jenkinsci/ghprb-plugin/issues/292. Sorry.\n\nOtherwise, if this message is too spammy, please complain to ixdy."}}
{"actor":{"display_login":"k8s-bot"}}