k3s/pkg
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
..
api image name may not have leading or trailing whitespace 2017-06-14 19:52:31 -04:00
apimachinery/tests Fix round-trip of Unstructured.OwnerReferences 2017-06-02 11:13:33 +10:00
apis Generated code 2017-06-12 10:08:46 -07:00
auth nodeidentifier: require nodes to have wellformed usernames 2017-06-08 23:47:01 -04:00
bootstrap/api
capabilities
client StatefulSetHasDesiredReplicas condition should check ObservedGeneration and update statefulset reaper use StatefulSetHasDesiredReplicas 2017-06-09 10:15:34 +08:00
cloudprovider Merge pull request #47605 from brendandburns/container 2017-06-15 21:54:30 -07:00
controller Merge pull request #45764 from krmayankk/depl-del-rs 2017-06-14 21:43:48 -07:00
conversion
credentialprovider
features Rotate kubelet client certificate. 2017-06-01 09:29:42 -07:00
fieldpath
fields
generated Add Traditional Chinese translation for kubectl 2017-06-08 15:24:04 +08:00
hyperkube
kubeapiserver generated 2017-06-14 10:20:33 -07:00
kubectl Merge pull request #45918 from juanvallejo/jvallejo/fix-kubectl-set-resources-local 2017-06-16 08:19:13 -07:00
kubelet Merge pull request #47612 from freehan/hostport-bug-fix 2017-06-15 18:54:08 -07:00
kubemark
labels
master sort current API versions and fallback for others 2017-06-14 09:29:44 -04:00
metrics
printers Merge pull request #42156 from croomes/storageos 2017-06-09 18:25:04 -07:00
probe
proxy Proxy: comments around ClusterCIDR use 2017-06-01 12:36:31 -07:00
quota
registry Merge pull request #46800 from deads2k/agg-33-priority 2017-06-14 21:43:44 -07:00
routes
runtime
security Merge pull request #47073 from Q-Lee/psp-run-as-non-root 2017-06-14 01:52:12 -07:00
securitycontext
serviceaccount
ssh
types
util Add Traditional Chinese translation for kubectl 2017-06-08 15:24:04 +08:00
version Convert go_binary linkstamp to x_defs 2017-06-08 14:59:55 -07:00
volume Merge pull request #47400 from chakri-nelluri/fixgetvolumename 2017-06-14 17:14:06 -07:00
watch
BUILD
OWNERS