kubernetes/hack/make-rules
Kubernetes Submit Queue c31893978b Merge pull request #45918 from juanvallejo/jvallejo/fix-kubectl-set-resources-local
Automatic merge from submit-queue

fix --local flag for kubectl commands

Fixes https://github.com/kubernetes/kubernetes/issues/47079

**Release note**:
```release-note
NONE
```

Fixes the `--local` flag for `kubectl set ...` sub-commands.
**As of the 1.7 release**, `PrinterForCommand` was updated to [use a mapper and typer for unstructured objects](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/factory_builder.go#L52), which further prevented the use of `--local` when there was no connection to an api server.


**before** (with no connection to a server)
```
$ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local
error: unable to connect to a server to handle "pods": Get https://10.13.137.149:8443/api: dial tcp 10.13.137.149:8443: getsockopt: connection refused
```

**after** (with no connection to a server)
```
$ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local
NAME              READY     STATUS    RESTARTS   AGE
mypod   0/1                 0          <unknown>
```

cc @smarterclayton @fabianofranz
2017-06-16 08:19:13 -07:00
..
helpers Rename {kube- ->}apiextensions-{-> api}server 2017-06-06 12:06:31 +02:00
build.sh Add a verbosity concept to kubernetes scripts 2016-08-04 22:01:22 -07:00
cross.sh Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows 2016-12-17 21:07:18 -08:00
make-help.sh remove hardcoded ansi to tput so that color coding works in multiple platforms including osx. 2017-02-10 10:25:43 -08:00
test-cmd-util.sh Merge pull request #45918 from juanvallejo/jvallejo/fix-kubectl-set-resources-local 2017-06-16 08:19:13 -07:00
test-cmd.sh Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
test-e2e-node.sh Fix cos image project to cos-cloud. 2017-05-23 15:12:03 -07:00
test-federation-cmd.sh Remove Initializers from federation 2017-06-05 19:12:36 -04:00
test-integration.sh enable race detection on integration tests 2017-06-06 16:27:49 -07:00
test-kubeadm-cmd.sh kubeadm: updated cmd tests as discussed in SIG 2017-02-07 12:47:07 -08:00
test.sh Rename {kube- ->}apiextensions-{-> api}server 2017-06-06 12:06:31 +02:00
verify.sh Exclude dockerized verify patterns 2017-05-31 18:08:16 -07:00
vet.sh Disable verify-test-owners.sh and make go vet more obvious 2016-12-21 11:44:04 -08:00