{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33958","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33958/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33958/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33958/events","html_url":"https://github.com/kubernetes/kubernetes/pull/33958","id":180722251,"number":33958,"title":"Add global timeout flag","user":{"login":"juanvallejo","id":3902875,"avatar_url":"https://avatars.githubusercontent.com/u/3902875?v=3","gravatar_id":"","url":"https://api.github.com/users/juanvallejo","html_url":"https://github.com/juanvallejo","followers_url":"https://api.github.com/users/juanvallejo/followers","following_url":"https://api.github.com/users/juanvallejo/following{/other_user}","gists_url":"https://api.github.com/users/juanvallejo/gists{/gist_id}","starred_url":"https://api.github.com/users/juanvallejo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanvallejo/subscriptions","organizations_url":"https://api.github.com/users/juanvallejo/orgs","repos_url":"https://api.github.com/users/juanvallejo/repos","events_url":"https://api.github.com/users/juanvallejo/events{/privacy}","received_events_url":"https://api.github.com/users/juanvallejo/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/release-note-label-needed","name":"release-note-label-needed","color":"db5a64"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/M","name":"size/M","color":"eebb00"}],"state":"open","locked":false,"assignee":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"assignees":[{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-10-03T19:16:32Z","updated_at":"2016-10-05T15:44:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33958","html_url":"https://github.com/kubernetes/kubernetes/pull/33958","diff_url":"https://github.com/kubernetes/kubernetes/pull/33958.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/33958.patch"},"body":"**Release note**:\r\n```release-note\r\nrelease-note-none\r\n```\r\n\r\nThis patch adds a global timeout flag (viewable with `kubectl options`) with\r\na default value of `0s` (meaning no timeout). It renames all local\r\n`timeout` flags previously declared in specific commands, such as\r\n`kubectl delete` and `kubectl scale`, to avoid conflict with the new\r\nglobal timeout flag.\r\n\r\nNo new functionality is added to enforce a timeout. The timeout value is\r\nadded to the default http client, so that zero values and default behavior\r\nis enforced by the http client.\r\n\r\nAdding a global timeout ensures that user-made scripts won't hang for an\r\nindefinite amount of time while performing remote calls (right now, remote\r\ncalls are re-tried up to 10 times when each attempt fails, however, there is\r\nno option to set a timeout in order to prevent any of these 10 attempts from\r\nhanging indefinitely).\r\n\r\n**Example**\r\n```\r\n$ kubectl get pods # no timeout flag set - default to 0s (which means no\r\ntimeout)\r\nNAME                      READY     STATUS    RESTARTS   AGE\r\ndocker-registry-1-h7etw   1/1       Running   1          2h\r\nrouter-1-uv0f9            1/1       Running   1          2h\r\n\r\n$ kubectl get pods --request-timeout=0 # zero means no timeout no timeout flag set\r\nNAME                      READY     STATUS    RESTARTS   AGE\r\ndocker-registry-1-h7etw   1/1       Running   1          2h\r\nrouter-1-uv0f9            1/1       Running   1          2h\r\n\r\n$kubectl get pods --request-timeout=1ms\r\nUnable to connect to the server: net/http: request canceled while\r\nwaiting for connection (Client.Timeout exceeded while awaiting headers)\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/33958)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/251713809","html_url":"https://github.com/kubernetes/kubernetes/pull/33958#issuecomment-251713809","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33958","id":251713809,"user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T15:44:43Z","updated_at":"2016-10-05T15:44:43Z","body":"cc: @kubernetes/kubectl "}}
{"actor":{"display_login":"kargakis"}}