Commit Graph

31172 Commits (a89a9e610e29135ca1b75c970cd06d2f33d704e3)

Author SHA1 Message Date
k8s-merge-robot a89a9e610e Merge pull request #28090 from saad-ali/moveRWPDTestToFlaky
Automatic merge from submit-queue

Mark "RW PD, remove it, then schedule" test flaky

Mark test as flaky while it is being investigated. Tracked by https://github.com/kubernetes/kubernetes/issues/27691

Assigning to @jlowdermilk since he's on call
2016-06-27 15:26:30 -07:00
k8s-merge-robot be682148fb Merge pull request #28108 from jsafrane/fix-cache-init
Automatic merge from submit-queue

Fix initialization of volume controller caches.

Fix `PersistentVolumeController.initializeCaches()` to pass pointers to volume or claim to  `storeObjectUpdate()` and add extra functions to enforce that the right types are checked in the future.

Fixes #28076
2016-06-27 14:18:51 -07:00
k8s-merge-robot 0742bc058c Merge pull request #27825 from freehan/jenkinjunit
Automatic merge from submit-queue

introduce shell2junit

fork shell2junit from https://github.com/manolo/shell2junit
2016-06-27 13:44:30 -07:00
k8s-merge-robot c67ebff413 Merge pull request #26872 from xiang90/daemon_clean
Automatic merge from submit-queue

daemon/controller.go: minor code cleanup
2016-06-27 13:44:23 -07:00
k8s-merge-robot 7d57beac62 Merge pull request #28042 from nikhiljindal/addOWNERS
Automatic merge from submit-queue

Adding OWNERS for federation

Adding OWNERS for the federation dir

cc @kubernetes/sig-cluster-federation
2016-06-27 13:09:38 -07:00
David McMahon 444ce19353 Update CHANGELOG.md for v1.2.5. 2016-06-27 11:20:34 -07:00
k8s-merge-robot 95a3737305 Merge pull request #21207 from WeixuZhuang/azure-push
Automatic merge from submit-queue

Enable setting up Kubernetes cluster in Ubuntu on Azure

Implement basic cloud provider functionality to deploy Kubernetes on
Azure.  SaltStack is used to deploy Kubernetes on top of Ubuntu 
virtual machines.  OpenVpn provides network connectivity.  For
kubelet authentication, we use basic authentication (username and 
password).  The scripts use the legacy Azure Service Management APIs.
  
We have set up a nightly test job in our Jenkins server for federated
testing to run the e2e test suite on Azure.  With the cloud provider
scripts in this commit, 14 e2e test cases pass in this environment.
We plan to implement additional Azure functionality to support more
test cases.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/21207)
<!-- Reviewable:end -->
2016-06-27 11:11:45 -07:00
Xiang Li 880432ca71 daemon/controller.go: minor code cleanup 2016-06-27 10:43:06 -07:00
Minhan Xia ec3f0e9f07 fork sh2ju to accommendate existing testing tools 2016-06-27 10:41:09 -07:00
k8s-merge-robot 653bce30ee Merge pull request #27939 from xiangpengzhao/fix_port_zero
Automatic merge from submit-queue

Should verify --secure-port and --insecure-port when starting kube-apiserver

When starting kube-apiserver, if we pass the flag `--secure-port` or `--insecure-port` with an invalid value (i.e. < 1 or > 65535), though there is an error message, the apiserver still runs normally. Actually, it should exit (as when not passing the flag `--etcd-servers` does), or else it's meaningless.

This fix is similar to #27762.

Maybe there is still other flags which have to be verified, if found, I will try to fix them.

Before fix:
```
root@vm:/home/paas/zxp/log/kube# kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --secure-port=-1 &
[1] 1500
root@vm:/home/paas/zxp/log/kube# E0623 04:14:15.378332    1500 controller.go:97] Unable to perform initial Kubernetes service initialization: Endpoints "kubernetes" is invalid: [subsets[0].ports[0].port: Invalid value: -1: must be between 1 and 65535, inclusive, subsets[0].ports[0].port: Invalid value: -1: must be between 1 and 65535, inclusive]
[restful] 2016/06/23 04:14:15 log.go:30: [restful/swagger] listing is available at https://172.16.1.11:-1/swaggerapi/
[restful] 2016/06/23 04:14:15 log.go:30: [restful/swagger] https://172.16.1.11:-1/swaggerui/ is mapped to folder /swagger-ui/
E0623 04:14:15.422742    1500 genericapiserver.go:730] Unable to listen for secure (listen tcp: invalid port -1); will try again.

root@vm:/home/paas/zxp/log/kube# 
root@vm:/home/paas/zxp/log/kube# E0623 04:14:30.425211    1500 genericapiserver.go:730] Unable to listen for secure (listen tcp: invalid port -1); will try again.

root@vm:/home/paas/zxp/log/kube# ps -ef|grep kube
root      1500 13507  1 04:14 pts/1    00:00:00 kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --secure-port=-1
```

After:
```
root@vm:/home/paas/zxp/log/kube# kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --insecure-port=-1 &
[1] 10570
root@vm:/home/paas/zxp/log/kube# F0623 05:37:16.124206   10570 genericapiserver.go:594] --insecure-port -1 must be between 1 and 65535, inclusive
goroutine 1 [running]:
k8s.io/kubernetes/vendor/github.com/golang/glog.stacks(0x4418400, 0x0, 0x0, 0x0)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:766 +0xb8
k8s.io/kubernetes/vendor/github.com/golang/glog.(*loggingT).output(0x43f7f60, 0xc800000003, 0xc8200e4600, 0x42b2d5a, 0x13, 0x252, 0x0)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:717 +0x259
k8s.io/kubernetes/vendor/github.com/golang/glog.(*loggingT).printf(0x43f7f60, 0xc800000003, 0x32278a0, 0x39, 0xc82037ac90, 0x1, 0x1)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:655 +0x1d4
k8s.io/kubernetes/vendor/github.com/golang/glog.Fatalf(0x32278a0, 0x39, 0xc82037ac90, 0x1, 0x1)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:1145 +0x5d
k8s.io/kubernetes/pkg/genericapiserver.verifyInsecurePort(0xc820199800)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:594 +0x103
k8s.io/kubernetes/pkg/genericapiserver.ValidateRunOptions(0xc820199800)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:603 +0x59
k8s.io/kubernetes/pkg/genericapiserver.DefaultAndValidateRunOptions(0xc820199800)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:607 +0x4e
k8s.io/kubernetes/cmd/kube-apiserver/app.Run(0xc820468b40, 0x0, 0x0)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go:83 +0x344
main.main()
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/apiserver.go:50 +0x121

[1]+  Exit 255                kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --insecure-port=-1
root@vm:/home/paas/zxp/log/kube# 
```
2016-06-27 10:20:31 -07:00
k8s-merge-robot db4c943f6d Merge pull request #27800 from derekwaynecarr/fix_filename_typo
Automatic merge from submit-queue

Fix typo in filename

just a simple fix
2016-06-27 09:49:16 -07:00
Jeff Lowdermilk cd9deccbbf Merge pull request #28117 from liggitt/fix-non-linux-compile
Fix reference to linux-only struct
2016-06-27 09:08:12 -07:00
Jordan Liggitt c202a405cd Fix reference to linux-only struct 2016-06-27 11:13:49 -04:00
Jan Safranek 169076e7da Fix initialization of volume controller caches.
Fix PersistentVolumeController.initializeCaches() to pass pointers to volume
or claim to storeObjectUpdate() and add extra functions to enforce that the
right types are checked in the future.


Fixes #28076
2016-06-27 13:08:02 +02:00
xiangpengzhao d8a7b4948b Should verify port value when starting kube-apiserver 2016-06-27 06:34:14 -04:00
k8s-merge-robot ecfd4aa131 Merge pull request #27755 from dubstack/dubstack-cgroup-interface
Automatic merge from submit-queue

Add support for basic QoS and pod level cgroup management

This PR is a WIP and is tied to this upstream issue #27204 
It adds support for creation,deletion and updates of cgroups in Kubernetes.
@vishh PTAL

Please note that the first commit is part of this PR: #27749
cc @kubernetes/sig-node

Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 22:21:15 -07:00
k8s-merge-robot d9cecdbc60 Merge pull request #28087 from luxas/fix_hyperkube_dns
Automatic merge from submit-queue

Hotfix: Fixup the hyperkube dns manifest from a breaking federation PR

This one has to be cherrypicked into v1.3.0, ref: #27986

@girishkalele @madhusudancs @quinton-hoole @eparis @nikhiljindal @mml @roberthbailey @david-mcmahon
2016-06-26 21:11:16 -07:00
k8s-merge-robot b4db89c457 Merge pull request #27644 from enj/dev/enj/issues/9307
Automatic merge from submit-queue

Use preferred group version when discovery fails due to 403

```
kubectl get pods --as bob
```
Returns:
```
error: failed to negotiate an api version; server supports: map[], client supports: map[autoscaling/v1:{} rbac.authorization.k8s.io/v1alpha1:{} federation/v1alpha1:{} batch/v1:{} v1:{} authentication.k8s.io/v1beta1:{} apps/v1alpha1:{} componentconfig/v1alpha1:{} authorization.k8s.io/v1beta1:{} batch/v2alpha1:{} extensions/v1beta1:{} policy/v1alpha1:{}]
```
It should return:
```
User "deads" cannot "impersonate" "users" with name "bob" in project ""
```

`serverVersions` is empty when discovery fails, thus we fallback to the `preferredGV`.

See openshift/origin#9307 and [openshift/origin/pull/9389](https://github.com/openshift/origin/pull/9389) for further details.
2016-06-26 21:11:12 -07:00
k8s-merge-robot d744fd411f Merge pull request #27598 from xiangpengzhao/optimize_canRunPod
Automatic merge from submit-queue

Refactor func canRunPod

After refactoring, we only need to check `if pod.Spec.SecurityContext == nil` once. The logic is a bit clearer.
2016-06-26 19:41:09 -07:00
k8s-merge-robot 700fbd0543 Merge pull request #27461 from euank/e2e-rkt-runtime
Automatic merge from submit-queue

e2e: Allow skipping tests for specific runtimes, skip a few tests under rkt

The main benefit of this is that it gives a developer more useful output (more signal to noise) for things that are known broken on that runtime.

cc @kubernetes/rktnetes-maintainers , @ixdy 

I'll run this PR through our jenkins and make sure things look happy and compare to the e2e results for this PR.
2016-06-26 18:47:42 -07:00
Buddha Prakash a5ead79d43 Add support for basic cgroup management 2016-06-26 15:41:34 -07:00
saadali b94442f470 Mark "RW PD, remove it, then schedule" test flaky 2016-06-26 15:33:32 -07:00
Lucas Käldström 622696ca85 Hotfix: Fixup the dns configuration from a breaking feredation PR 2016-06-27 00:03:20 +03:00
k8s-merge-robot ff7c280200 Merge pull request #27163 from ixdy/curl-flakes
Automatic merge from submit-queue

Pass --keepalive-time 2 to curl to fix unexpected EOF flakes

I hope this fixes #22967.
2016-06-26 13:35:03 -07:00
k8s-merge-robot e235120121 Merge pull request #28075 from ibm-contribs/privileged
Automatic merge from submit-queue

Fixed typos - privileged not priviliged

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This fixes a bug introduced in #26596.
No release note needed.

CC @jcrugzz 

Fixes #28074
2016-06-26 12:59:49 -07:00
k8s-merge-robot d195829083 Merge pull request #27881 from ronnielai/disk-check
Automatic merge from submit-queue

Modifying the default container GC policy parameters

- Marked container GC policy to be deprecated in the future
- Changed the default values for container GC policy per the [eviction proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-eviction.md)
2016-06-26 10:23:22 -07:00
k8s-merge-robot 11c5d22004 Merge pull request #27750 from dims/fix-issue-27730
Automatic merge from submit-queue

Fix pkg/kubelet unit tests fail on OSX

use runtime.GOOS for the OperatingSystem and not hardcode it to linux.

Fixes #27730
2016-06-26 06:56:37 -07:00
k8s-merge-robot d64333419c Merge pull request #27749 from dubstack/dubstack-refactor-qos
Automatic merge from submit-queue

[Refactor] QOS to have QOS Class type for QoS classes

This PR adds a QOSClass type and initializes QOSclass constants for the three QoS classes.
It would be good to use this in all future QOS related features. 
This would be good to have for the (Pod level cgroups isolation proposal)[https://github.com/kubernetes/kubernetes/pull/26751] that i am working on aswell.
@vishh PTAL
 
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 06:23:23 -07:00
k8s-merge-robot 00e7ab583e Merge pull request #27546 from aveshagarwal/master-delete-ns-pod-reason
Automatic merge from submit-queue

Add pod status reason when there are remaining pods.

@yujuhong
2016-06-26 00:39:02 -07:00
k8s-merge-robot 7fbf4ac625 Merge pull request #27541 from gitfred/attach-init-con
Automatic merge from submit-queue

Fix attach command for InitContainers

Added InitContainers to the things that GetContainer in attach.go has to look for to find a container to attach. Also test case added.

fixes #27540
2016-06-26 00:04:49 -07:00
k8s-merge-robot a43aa608a1 Merge pull request #27508 from aaronlevy/dapi-hostip
Automatic merge from submit-queue

Kubelet can retrieve host IP even when apiserver has not been contacted

fixes https://github.com/kubernetes/kubernetes/issues/26590, fixes https://github.com/kubernetes/kubernetes/issues/6558

Right now the kubelet expects to get the hostIP from the kubelet's local nodeInfo cache. However, this will be empty if there is no api-server (or the apiServer has not yet been contacted).

In the case of static pods, this change means the downward api can now be used to populate hostIP.
2016-06-25 23:29:05 -07:00
k8s-merge-robot a6f6a74a9d Merge pull request #27359 from sttts/sttts-kubectl-exec-not-running
Automatic merge from submit-queue

Add not-running check to kubectl-exec

Different cases:
- pod is started, container terminated: 
```
error: error executing remote command: error executing command in container: container not found ("sleep1")
```
- pod has terminated:
```
error: cannot exec into a container in a completed pod; current phase is Succeeded
```
- container does not exist in pod spec:
```
Error from server: container foo is not valid for pod multi-container
```

Fixes https://github.com/openshift/origin/issues/8472#event-681794952
2016-06-25 21:31:03 -07:00
k8s-merge-robot 56db230455 Merge pull request #27331 from hpcloud/hpe/vsphere-get-id
Automatic merge from submit-queue

vSphere provider - Getting node data by ip instead of uuid

To get the uuid we need the service to be running as root. This change
allows us to run the controller-manager and api server as non-root.
2016-06-25 20:57:50 -07:00
k8s-merge-robot ea1248e9f2 Merge pull request #27300 from euank/remove-dead-stack-get
Automatic merge from submit-queue

kubelt: Remove a couple lines of dead code

Presumably that code was added for debugging reasons and never removed. Hopefully.

If it's actually important and there's a good reason to do what looks like a no-op to get pause-the-world behaviour or whatever, I'd hope there'd be a comment.

cc @pwittrock
2016-06-25 20:23:38 -07:00
k8s-merge-robot 847ef7255c Merge pull request #27250 from xiangpengzhao/fix_docproxy
Automatic merge from submit-queue

Set network related flags for container gen-swagger-docs

When running `hack/update-api-reference-docs.sh`, I get failure messages as below. This is because:

My env is behind a proxy, I have to input username/password in a page first for authentication before visiting internet. But I have no any way to visit that page in GUI mode in the container gen-swagger-docs. Can we run the container gen-swagger-docs using host network and passing an env variable `https_proxy` to it? I try this way and it works well. This would be helpful for me and other developers who may have this issue.

cc @caesarxuchao Thanks!

```
root@vm:/home/paas/zxp/code/k8s/fork/kubernetes# hack/update-api-reference-docs.sh
Note: This assumes that swagger spec has been updated. Please run hack/update-swagger-spec.sh to ensure that.
Generating api reference docs at /home/paas/zxp/code/k8s/fork/kubernetes/_output/generated_html
Reading swagger spec from: /home/paas/zxp/code/k8s/fork/kubernetes/api/swagger-spec/
--2016-06-09 16:35:26--  https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/api/v1/register.go
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... failed: Name or service not known.
wget: unable to resolve host address ‘raw.githubusercontent.com’
--2016-06-09 16:36:06--  https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/api/v1/register.go
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... failed: Name or service not known.
wget: unable to resolve host address ‘raw.githubusercontent.com’
--2016-06-09 16:36:46--  https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/api/v1/register.go
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... failed: Name or service not known.
wget: unable to resolve host address ‘raw.githubusercontent.com’
!!! Error in hack/update-api-reference-docs.sh:71
  'docker run ${user_flags} --rm -v "${TMP_IN_HOST}":/output:z -v "${SWAGGER_PATH}":/swagger-source:z gcr.io/google_containers/gen-swagger-docs:v5 "${SWAGGER_JSON_NAME}" "${REGISTER_FILE_URL}"' exited with status 1
Call stack:
  1: hack/update-api-reference-docs.sh:71 main(...)
Exiting with status 1
```
2016-06-25 19:49:54 -07:00
k8s-merge-robot 93037844c1 Merge pull request #27293 from caesarxuchao/add-patch-to-clientset
Automatic merge from submit-queue

[client-gen]Add Patch to clientset

* add the Patch() method to the clientset. 
* I have to rename the existing Patch() method of `Event` to PatchWithEventNamespace() to avoid overriding.
* some minor changes to the fake Patch action.

cc @Random-Liu since he asked for the method
@kubernetes/sig-api-machinery 

ref #26580 

```release-note
Add the Patch method to the generated clientset.
```
2016-06-25 19:15:11 -07:00
k8s-merge-robot 84c8158b2a Merge pull request #27263 from sttts/sttts-kubectl-attach-cmdName
Automatic merge from submit-queue

Dynamically derive AttachOptions.CommandName

This PR sets AttachOptions.CommandName dynamically depending on the corba Command
hierarchy. If the root command is named e.g. "oc" (for the OpenShift cli) this
will result in "oc attach" instead of the static "kubectl attach" before this
patch.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1341450
2016-06-25 18:40:56 -07:00
k8s-merge-robot cbab337b99 Merge pull request #27242 from smarterclayton/discovery_prefix
Automatic merge from submit-queue

Make discovery client parameterizable to legacy prefix
2016-06-25 17:26:05 -07:00
k8s-merge-robot 7d3d784655 Merge pull request #27902 from caesarxuchao/fix-test-cmd
Automatic merge from submit-queue

fix test-cmd multi-resource test

See inline descriptions.
2016-06-25 14:47:30 -07:00
k8s-merge-robot 1effc5af91 Merge pull request #28002 from asalkeld/init-cache-error
Automatic merge from submit-queue

Fix startup type error in initializeCaches

The following error was getting logged:
PersistentVolumeController can't initialize caches, expected list of volumes, got:
&{TypeMeta:{Kind: APIVersion:} ListMeta:{SelfLink:/api/v1/persistentvolumes ResourceVersion:11} Items:[]}

The tests make extensive use of NewFakeControllerSource which uses api.List
instead of api.PersistentVolumeList. So use reflect to help iterate over the
items then assert the item type.

fixes #27757
2016-06-25 14:13:15 -07:00
Mike Spreitzer 876d77a699 Fixed typos - privileged not priviliged
This fixes a bug introduced in #26596.

Fixes #28074
2016-06-25 16:06:33 -04:00
k8s-merge-robot 59b88d7ab6 Merge pull request #26925 from ZTE-PaaS/249043822-patch-1
Automatic merge from submit-queue

optimize deleteFromIndices method of thread_safe_store

As all methods of thread_safe_store are threadsafe, so i think, in deleteFromIndices method, if the index is nil, need not run the for structure below
2016-06-25 12:57:50 -07:00
k8s-merge-robot 601173c2fe Merge pull request #26916 from caesarxuchao/podgc
Automatic merge from submit-queue

rename the gc for terminated pods to "podgc"

to avoid name collision with the [generic garbage collector](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/garbagecollector/garbagecollector.go)
2016-06-25 12:24:07 -07:00
k8s-merge-robot d1407ecdd3 Merge pull request #26867 from xiang90/daemon
Automatic merge from submit-queue

daemon/controller.go: refactor worker

1. function name is better to be verb or verb+noun

2. remove unnecessary func call
2016-06-25 11:43:49 -07:00
k8s-merge-robot 00b5b548d6 Merge pull request #26854 from xiang90/cacher
Automatic merge from submit-queue

cacher.go: remove NewCacher func

NewCacher is a wrapper of NewCacherFromConfig. NewCacher understands
how to create a key func from scopeStrategy. However, it is not the
responsibility of cacher. So we should remove this function, and
construct the config in its caller, which should understand scopeStrategy.
2016-06-25 11:10:06 -07:00
k8s-merge-robot 951b591716 Merge pull request #26722 from deads2k/local-patch
Automatic merge from submit-queue

let patch use --local flag like `kubectl set image`

Adds the concept of a `--local` flag to `kubectl patch`.  This flag is similar to `kubectl set image -f --local` because it will use the content of the file as the input to the patch operation instead of using the file content to file resource/name tuples.  

This pull lets you run something like `kubectl create deployment --dry-run -o yaml | kubectl set volume --local -f - -o yaml | kubectl patch --local -f - --patch {} | kubectl create -f -`

As proof that it works, you can run against a local file just to mess around with it, but `--local -f -` is the most likely case.
```
$kubectl patch --local -f pkg/api/validation/testdata/v1/validPod.yaml --patch='{"spec": {"restartPolicy":"Never"}}'
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    name: redis-master
  name: name
spec:
  containers:
  - args:
    - this
    - is
    - an
    - ok
    - command
    image: gcr.io/fake_project/fake_image:fake_tag
    name: master
    resources: {}
  restartPolicy: Never
status: {}
```

This is useful for setting rarely used, but immutable fields from `kubectl create` or `kubectl convert` without dropping to an interactive editor.

Some discussion here: https://github.com/kubernetes/kubernetes/issues/21648#issuecomment-218579977

@smarterclayton @kubernetes/kubectl 
 @eparis @soltysh @stevekuznetsov we've talked about this separately
2016-06-25 10:00:41 -07:00
k8s-merge-robot 81c8fe37e6 Merge pull request #26598 from janetkuo/3rd-party-error-logs
Automatic merge from submit-queue

Add more information when throwing errors in discoverying 3rd party resources

#26425


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-25 09:25:58 -07:00
k8s-merge-robot 50d58f4437 Merge pull request #26596 from jcrugzz/ALLOW-PRIVILEGED
Automatic merge from submit-queue

[fix] allow ALLOW_PRIVILEGED to be passed to kubelet and kube-api

This is something that we need for running docker in docker. Please let me know if you would consider this change. Thanks :)
2016-06-25 08:52:14 -07:00
k8s-merge-robot 99951007ff Merge pull request #26539 from ripcurld00d/fix_json_template_url
Automatic merge from submit-queue

Update the jsonpath template URL

It seems like http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md redirects to http://kubernetes.io/docs/user-guide/jsonpath/.

Therefore, updating to the new URL where is required.

Relate to https://github.com/openshift/origin/pull/9013
2016-06-25 08:17:31 -07:00
k8s-merge-robot 464eff2bf2 Merge pull request #26504 from nowprovision/patch-1
Automatic merge from submit-queue

Fix error handling in endpoint controller
2016-06-25 07:43:49 -07:00