• Kubernetes Submit Queue's avatar
    Merge pull request #33958 from juanvallejo/jvallejo/add-global-timeout-flag · c0bd6e8e
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Add global timeout flag
    
    **Release note**:
    ```release-note
    Add a new global option "--request-timeout" to the `kubectl` client
    ```
    
    UPSTREAM: https://github.com/kubernetes/client-go/pull/10
    
    This patch adds a global timeout flag (viewable with `kubectl -h`) with
    a default value of `0s` (meaning no timeout).
    
    The timeout value is added to the default http client, so that zero
    values and default behavior are enforced by the client.
    
    Adding a global timeout ensures that user-made scripts won't hang for an
    indefinite amount of time while performing remote calls (right now, remote
    calls are re-tried up to 10 times when each attempt fails, however, there is
    no option to set a timeout in order to prevent any of these 10 attempts from
    hanging indefinitely).
    
    **Example**
    ```
    $ kubectl get pods # no timeout flag set - default to 0s (which means no
    timeout)
    NAME                      READY     STATUS    RESTARTS   AGE
    docker-registry-1-h7etw   1/1       Running   1          2h
    router-1-uv0f9            1/1       Running   1          2h
    
    $ kubectl get pods --request-timeout=0 # zero means no timeout no timeout flag set
    NAME                      READY     STATUS    RESTARTS   AGE
    docker-registry-1-h7etw   1/1       Running   1          2h
    router-1-uv0f9            1/1       Running   1          2h
    
    $kubectl get pods --request-timeout=1ms
    Unable to connect to the server: net/http: request canceled while
    waiting for connection (Client.Timeout exceeded while awaiting headers)
    ```
    c0bd6e8e
Name
Last commit
Last update
..
boilerplate Loading commit data...
cmd/teststale Loading commit data...
e2e-internal Loading commit data...
gen-swagger-doc Loading commit data...
jenkins Loading commit data...
lib Loading commit data...
make-rules Loading commit data...
testdata Loading commit data...
verify-flags Loading commit data...
.linted_packages Loading commit data...
OWNERS Loading commit data...
autogenerated_placeholder.txt Loading commit data...
benchmark-go.sh Loading commit data...
benchmark-integration.sh Loading commit data...
build-cross.sh Loading commit data...
build-go.sh Loading commit data...
build-ui.sh Loading commit data...
cherry_pick_pull.sh Loading commit data...
dev-build-and-push.sh Loading commit data...
dev-build-and-up.sh Loading commit data...
dev-push-hyperkube.sh Loading commit data...
e2e-node-test.sh Loading commit data...
e2e.go Loading commit data...
federated-ginkgo-e2e.sh Loading commit data...
generate-docs.sh Loading commit data...
get-build.sh Loading commit data...
ginkgo-e2e.sh Loading commit data...
godep-save.sh Loading commit data...
grab-profiles.sh Loading commit data...
install-etcd.sh Loading commit data...
list-feature-tests.sh Loading commit data...
local-up-cluster.sh Loading commit data...
lookup_pull.py Loading commit data...
run-in-gopath.sh Loading commit data...
test-cmd.sh Loading commit data...
test-go.sh Loading commit data...
test-integration.sh Loading commit data...
test-update-storage-objects.sh Loading commit data...
update-all.sh Loading commit data...
update-api-reference-docs.sh Loading commit data...
update-bindata.sh Loading commit data...
update-codecgen.sh Loading commit data...
update-codegen.sh Loading commit data...
update-federation-api-reference-docs.sh Loading commit data...
update-federation-generated-swagger-docs.sh Loading commit data...
update-federation-openapi-spec.sh Loading commit data...
update-federation-swagger-spec.sh Loading commit data...
update-generated-docs.sh Loading commit data...
update-generated-protobuf-dockerized.sh Loading commit data...
update-generated-protobuf.sh Loading commit data...
update-generated-runtime-dockerized.sh Loading commit data...
update-generated-runtime.sh Loading commit data...
update-generated-swagger-docs.sh Loading commit data...
update-godep-licenses.sh Loading commit data...
update-gofmt.sh Loading commit data...
update-munge-docs.sh Loading commit data...
update-openapi-spec.sh Loading commit data...
update-swagger-spec.sh Loading commit data...
update_owners.py Loading commit data...
verify-all.sh Loading commit data...
verify-api-reference-docs.sh Loading commit data...
verify-boilerplate.sh Loading commit data...
verify-codecgen.sh Loading commit data...
verify-codegen.sh Loading commit data...
verify-description.sh Loading commit data...
verify-flags-underscore.py Loading commit data...
verify-generated-docs.sh Loading commit data...
verify-generated-protobuf.sh Loading commit data...
verify-generated-runtime.sh Loading commit data...
verify-generated-swagger-docs.sh Loading commit data...
verify-godep-licenses.sh Loading commit data...
verify-godeps.sh Loading commit data...
verify-gofmt.sh Loading commit data...
verify-golint.sh Loading commit data...
verify-govet.sh Loading commit data...
verify-import-boss.sh Loading commit data...
verify-linkcheck.sh Loading commit data...
verify-munge-docs.sh Loading commit data...
verify-openapi-spec.sh Loading commit data...
verify-swagger-spec.sh Loading commit data...
verify-symbols.sh Loading commit data...
verify-test-images.sh Loading commit data...