Commit Graph

19134 Commits (3695e85b345858f919a294c2a3c2e95ee5be5341)

Author SHA1 Message Date
Maciej Szulik 0c90065bb1 Update owners file for job and cronjob controller 2017-02-07 11:24:51 +01:00
Jan Safranek d6e9803007 Add OWNERS file for GCE cloud provider 2017-02-07 10:35:14 +01:00
Jordan Liggitt 09b5d7279f
install authentication.k8s.io/v1, add tests 2017-02-07 01:44:56 -05:00
Jordan Liggitt 529ce5d3aa
Generated files for authentication.k8s.io/v1 2017-02-07 01:44:56 -05:00
Brendan Burns d9c4a289a6 Extract strings for translation. 2017-02-06 22:32:01 -08:00
Jordan Liggitt 9adf9225c4
Copy authentication.k8s.io/v1beta1 types to v1 2017-02-07 00:57:14 -05:00
Kubernetes Submit Queue 9dec47dc28 Merge pull request #39369 from CallMeFoxie/validation-hostip
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Validate unique  against HostPort/Protocol/HostIP

**What this PR does / why we need it**:
We can bind to specific IPs however validation will fail for different HostIP:HostPort combination. This is a small fix to check combination of HostPort/Protocol/HostIP rather than just HostPort/Protocol.

Sample configuration
...
"ports": [
              {
                "protocol": "TCP",
                "containerPort": 53,
                "hostPort": 55,
                "hostIP": "127.0.0.1",
                "name": "dns-local-tcp"
              },
              {
                "protocol": "TCP",
                "containerPort": 53,
                "hostPort": 55,
                "hostIP": "127.0.0.2",
                "name": "dns-local-tcp2"
              }
]

Before:
* spec.template.spec.containers[1].ports[2].hostPort: Duplicate value: "55/TCP"
* spec.template.spec.containers[1].ports[3].hostPort: Duplicate value: "55/TCP"

After applying the patch:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:55            0.0.0.0:*               LISTEN      3644/docker-proxy
tcp        0      0 127.0.0.2:55            0.0.0.0:*               LISTEN      3629/docker-proxy

Thanks
Ashley

**Release note**:

```release-note
```
2017-02-06 20:57:18 -08:00
Kubernetes Submit Queue 98f97496ef Merge pull request #40903 from yujuhong/security_opts
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Set docker opt separator correctly for SELinux options

This is based on @pmorie's commit from #40179
2017-02-06 20:57:17 -08:00
Kubernetes Submit Queue 460f44347c Merge pull request #40709 from liggitt/v1-sar
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Promote SubjectAccessReview to v1

We have multiple features that depend on this API:

SubjectAccessReview
- [webhook authorization](https://kubernetes.io/docs/admin/authorization/#webhook-mode)
- [kubelet delegated authorization](https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-authorization)
- add-on API server delegated authorization

The API has been in use since 1.3 in beta status (v1beta1) with negligible changes:
- Added a status field for reporting errors evaluating access
- A typo was discovered in the SubjectAccessReviewSpec Groups field name

This PR promotes the existing v1beta1 API to v1, with the only change being the typo fix to the groups field. (fixes https://github.com/kubernetes/kubernetes/issues/32709)

Because the API does not persist data (it is a query/response-style API), there are no data migration concerns.

This positions us to promote the features that depend on this API to stable in 1.7

cc @kubernetes/sig-auth-api-reviews @kubernetes/sig-auth-misc

```release-note
The authorization.k8s.io API group was promoted to v1
```
2017-02-06 20:57:15 -08:00
Kubernetes Submit Queue 821e171247 Merge pull request #35950 from nikhiljindal/nsdelreuse
Automatic merge from submit-queue

federation: Refactoring namespaced resources deletion code from kube ns controller and sharing it with fed ns controller

Ref https://github.com/kubernetes/kubernetes/issues/33612

Refactoring code in kube namespace controller to delete all resources in a namespace when the namespace is deleted. Refactored this code into a separate NamespacedResourcesDeleter class and calling it from federation namespace controller.
This is required for enabling cascading deletion of namespaced resources in federation apiserver.
Before this PR, we were directly deleting the namespaced resources and assuming that they go away immediately. With cascading deletion, we will have to wait for the corresponding controllers to first delete the resources from underlying clusters and then delete the resource from federation control plane. NamespacedResourcesDeleter has this waiting logic.

cc @kubernetes/sig-federation-misc @caesarxuchao @derekwaynecarr @mwielgus
2017-02-06 18:10:58 -08:00
Kubernetes Submit Queue 2eebe956cc Merge pull request #40996 from NickrenREN/openstack-servername
Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

optimize duplicate openstack serverList judgement

if len(serverList) > 1, we will return err in pager.EachPage() function,so here we do not need to judge again
2017-02-06 16:51:11 -08:00
Kubernetes Submit Queue e0db0932a7 Merge pull request #40999 from xingzhou/tiny-bug
Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

Fixed a tiny bug on using RoleBindingGenerator

Fixed a typo bug while using RoleBindingGenerator, this
bug causes error when binding role to service accounts
through "kubectl create rolebinding" command.
2017-02-06 16:51:08 -08:00
Kubernetes Submit Queue 9abfa6b446 Merge pull request #40385 from ncdc/shared-informers-02-swap-existing
Automatic merge from submit-queue

Replace hand-written informers with generated ones

Replace existing uses of hand-written informers with generated ones.
Follow-up commits will switch the use of one-off informers to shared
informers.

This is a precursor to #40097. That PR will switch one-off informers to shared informers for the majority of the code base (but not quite all of it...).

NOTE: this does create a second set of shared informers in the kube-controller-manager. This will be resolved back down to a single factory once #40097 is reviewed and merged.

There are a couple of places where I expanded the # of caches we wait for in the calls to `WaitForCacheSync` - please pay attention to those. I also added in a commented-out wait in the attach/detach controller. If @kubernetes/sig-storage-pr-reviews is ok with enabling the waiting, I'll do it (I'll just need to tweak an integration test slightly).

@deads2k @sttts @smarterclayton @liggitt @soltysh @timothysc @lavalamp @wojtek-t @gmarek @sjenning @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-06 16:25:42 -08:00
Vishnu Kannan fb2d98ac8f adding approvers for componentconfig
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-06 16:05:53 -08:00
Kubernetes Submit Queue 88673271d2 Merge pull request #41009 from deads2k/owners-06-registry
Automatic merge from submit-queue

add deads2k to registry package owners

I established the package layout and wrote a lot of the non-boilerplate code in this package.
2017-02-06 15:35:06 -08:00
Jordan Liggitt 8706bc9617
install authorization.k8s.io/v1, add tests
Use specific v1beta1 Authorization client

Add client expansions
2017-02-06 18:16:51 -05:00
Jordan Liggitt 31d45fe78f
Generated files 2017-02-06 18:16:51 -05:00
Yu-Ju Hong 05c3b8c1cf Set docker opt separator correctly for SELinux options 2017-02-06 14:47:30 -08:00
Jordan Liggitt ae73f2498f
Fix typo in v1beta1 field name 2017-02-06 17:43:55 -05:00
Jordan Liggitt e4d6c48900
Copy v1beta1 authorization types to v1 2017-02-06 17:43:55 -05:00
p0lyn0mial b2cce0ac8e added short names for resources which are exposed during discovery 2017-02-06 23:35:07 +01:00
Klaus Ma f6aa8bbb8f Updated NodeRef to clientv1.ObjectReference. 2017-02-07 06:27:06 +08:00
Kubernetes Submit Queue d4bcf3ede5 Merge pull request #40951 from yujuhong/fix_cri_portforward
Automatic merge from submit-queue (batch tested with PRs 40930, 40951)

Fix CRI port forwarding

Websocket support was introduced #33684, which broke the CRI
implementation. This change fixes it.
2017-02-06 14:27:05 -08:00
Hemant Kumar 8fad1a6aec Add gnufied as reviewer for aws and gce volumes 2017-02-06 16:38:13 -05:00
Kubernetes Submit Queue 095f4ef624 Merge pull request #40967 from pwittrock/discovery-client
Automatic merge from submit-queue (batch tested with PRs 40943, 40967)

Switch kubectl version and api-versions to create a discovery client …

…directly.

The clientset will throw an error for aggregated apiservers because the
clientset looks for specific versions of apis that are compiled into
the client.  These will be missing from aggregated apiservers.
The discoveryclient is fully dynamic and does not rely on compiled
in apiversions.

```release-note
NONE
```
2017-02-06 12:22:56 -08:00
Kubernetes Submit Queue b87adb21b1 Merge pull request #40943 from deads2k/apiserver-01-admission-types
Automatic merge from submit-queue (batch tested with PRs 40943, 40967)

switch admission serialized config to an apiserver type

Switches the kube admission config from componentconfig to the new `apiserver.k8s.io` group so that all API servers can use the shared configuration.  This switch external serialization, but it does not move the code that reads the config.  I'd like to do that as a follow-on.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @smarterclayton 
@derekwaynecarr ptal
@sttts
2017-02-06 12:22:54 -08:00
rootfs b36009be7f use instance's Name to attach gce disk
Signed-off-by: rootfs <hchen@redhat.com>
2017-02-06 14:45:41 -05:00
nikhiljindal ca6f821738 Autogenerated bazel changes 2017-02-06 10:50:40 -08:00
nikhiljindal 74676f6995 Updating federation namespace controller to share namespaced resources deletion code with kube namespace controller 2017-02-06 10:50:40 -08:00
nikhiljindal c1c2a12134 Refactorying namespace deletion code to enable reuse with federation namespace controller 2017-02-06 10:50:40 -08:00
Andy Goldstein 70c6087600 Replace hand-written informers with generated ones
Replace existing uses of hand-written informers with generated ones.
 Follow-up commits will switch the use of one-off informers to shared
 informers.
2017-02-06 13:49:27 -05:00
Kubernetes Submit Queue 010559ece6 Merge pull request #39321 from NickrenREN/controller-utils
Automatic merge from submit-queue (batch tested with PRs 39681, 39321, 41018, 40883)

remove never used var
2017-02-06 10:46:56 -08:00
deads2k 75841dc4f1 switch admission serialized config to an apiserver type 2017-02-06 11:38:08 -05:00
Maciej Szulik 19a25e480f Avoid closing over range variables 2017-02-06 16:02:21 +01:00
Kubernetes Submit Queue 6f37347fce Merge pull request #40931 from deads2k/owners-05-liggitt
Automatic merge from submit-queue

add liggitt to apimachinery/apiserver packages

Add @liggitt to apimachinery and apiserver packages.
2017-02-06 06:45:26 -08:00
deads2k 00bcf81943 add deads2k to registry package owners 2017-02-06 07:41:18 -05:00
Humble Chirammal 72f0a5219a Update specs for iscsi volume source.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-06 17:21:33 +05:30
Humble Chirammal 332e26dc8c Add portals field to iscsi volume source to achieve multipathing.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-06 17:06:33 +05:30
Ashley Reese 10117cc815 Validate unique host ports with host IPs as well 2017-02-06 09:28:41 +01:00
Xing Zhou 8db1cfc2f6 Fixed a tiny bug on using RoleBindingGenerator
Fixed a typo bug while using RoleBindingGenerator to bind
role to service accounts.
2017-02-06 16:00:51 +08:00
Xing Zhou 7a4293f6df Remove useless param from kubectl create rolebinding
The `force` param is not used in
`kubectl create rolebinding` & `kubectl create clusterrolebinding`
commands, removed it.
2017-02-06 15:49:43 +08:00
NickrenREN 70ab5fc6b8 optimize duplicate openstack serverList judgement
if len(serverList) > 1, we will return err in pager.EachPage() function,so here we do not need to do the judgement again
2017-02-06 14:30:52 +08:00
Klaus Ma cc26fe6ee9 Removed unnecessarly empty line. 2017-02-06 11:10:34 +08:00
bruceauyeung eac48c2cd5 avoid repeated length calculation and some other code improvements
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2017-02-06 09:19:46 +08:00
Dr. Stefan Schimanski 1c53f46233 Add custom conversion funcs not directly into pkg/api.Scheme 2017-02-05 15:01:47 +01:00
Phillip Wittrock 9abd275607 Switch kubectl version and api-versions to create a discovery client directly.
The clientset will throw an error for aggregated apiservers because the
clientset looks for specific versions of apis that are compiled into
the client.  These will be missing from aggregated apiservers.
The discoveryclient is fully dynamic and does not rely on compiled
in apiversions.
2017-02-04 08:38:19 -08:00
NickrenREN a62da3e22b record ReduceCPULimits result err info if possible
record ReduceCPULimits result err info if possible
2017-02-04 21:12:39 +08:00
Kubernetes Submit Queue 2541c16692 Merge pull request #40942 from ymqytw/extract_util_from_SMPatch
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Extract util used by jsonmergepatch and SMPatch

followup  https://github.com/kubernetes/kubernetes/pull/40666#discussion_r99198931

Extract some util out of the `strategicMergePatch` to make `jsonMergePatch` doesn't depend on `strategicMergePatch`.

```release-note
None
```

cc: @liggitt
2017-02-04 04:43:10 -08:00
Kubernetes Submit Queue a777a8e3ba Merge pull request #39972 from derekwaynecarr/pod-cgroups-default
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Rename experimental-cgroups-per-pod flag

**What this PR does / why we need it**:
1. Rename `experimental-cgroups-per-qos` to `cgroups-per-qos`
1. Update hack/local-up-cluster to match `CGROUP_DRIVER` with docker runtime if used.

**Special notes for your reviewer**:
We plan to roll this feature out in the upcoming release.  Previous node e2e runs were running with this feature on by default.  We will default this feature on for all e2es next week.

**Release note**:
```release-note
Rename --experiemental-cgroups-per-qos to --cgroups-per-qos
```
2017-02-04 04:43:08 -08:00
Kubernetes Submit Queue 6adf3e5268 Merge pull request #40877 from yujuhong/rm_mirror_annotation
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Remove the temporary fix for pre-1.0 mirror pods

The fix was introduced to fix #15960 for pre-1.0 pods. It should be safe to remove
this fix now.
2017-02-04 04:43:06 -08:00
Kubernetes Submit Queue a2931c6218 Merge pull request #40289 from xilabao/fix-save-config-in-create-subcommand
Automatic merge from submit-queue

fix --save-config in create subcommand

--save-config option doesn't work.
```
#kubectl create rolebinding a --role=b --user=c --save-config  
rolebinding "a" created
```
old output:
```
#kubectl get rolebinding a -o yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  creationTimestamp: 2017-01-23T10:09:48Z
  name: a
  namespace: default
  resourceVersion: "281"
  selfLink: /apis/rbac.authorization.k8s.io/v1beta1/namespaces/default/rolebindings/a
  uid: 12abccd6-e154-11e6-819c-525400f84377
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: b
subjects:
- apiVersion: rbac/v1alpha1
  kind: User
  name: c
```

expected output:
```
#kubectl get rolebinding a -o yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"kind":"RoleBinding","apiVersion":"rbac.authorization.k8s.io/v1beta1","metadata":{"name":"c","creationTimestamp":null},"subjects":[{"kind":"User","apiVersion":"rbac/v1alpha1","name":"c"}],"roleRef":{"apiGroup":"rbac.authorization.k8s.io","kind":"Role","name":"b"}}
  creationTimestamp: 2017-01-23T10:09:48Z
  name: a
  namespace: default
  resourceVersion: "281"
  selfLink: /apis/rbac.authorization.k8s.io/v1beta1/namespaces/default/rolebindings/a
  uid: 12abccd6-e154-11e6-819c-525400f84377
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: b
subjects:
- apiVersion: rbac/v1alpha1
  kind: User
  name: c
```
2017-02-04 04:40:29 -08:00
Kubernetes Submit Queue 4796c7b409 Merge pull request #40727 from Random-Liu/handle-cri-in-place-upgrade
Automatic merge from submit-queue

CRI: Handle cri in-place upgrade

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

## How does this PR restart/remove legacy containers/sandboxes?
With this PR, dockershim will convert and return legacy containers and infra containers as regular containers/sandboxes. Then we can rely on the SyncPod logic to stop the legacy containers/sandboxes, and the garbage collector to remove the legacy containers/sandboxes.

To forcibly trigger restart:
* For infra containers, we manually set `hostNetwork` to opposite value to trigger a restart (See [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/kuberuntime_manager.go#L389))
* For application containers, they will be restarted with the infra container.
## How does this PR avoid extra overhead when there is no legacy container/sandbox?
For the lack of some labels, listing legacy containers needs extra `docker ps`. We should not introduce constant performance regression for legacy container cleanup. So we added the `legacyCleanupFlag`:
* In `ListContainers` and `ListPodSandbox`, only do extra `ListLegacyContainers` and `ListLegacyPodSandbox` when `legacyCleanupFlag` is `NotDone`.
* When dockershim starts, it will check whether there are legacy containers/sandboxes.
  * If there are none, it will mark `legacyCleanupFlag` as `Done`.
  * If there are any, it will leave `legacyCleanupFlag` as `NotDone`, and start a goroutine periodically check whether legacy cleanup is done.
This makes sure that there is overhead only when there are legacy containers/sandboxes not cleaned up yet.

## Caveats
* In-place upgrade will cause kubelet to restart all running containers.
* RestartNever container will not be restarted.
* Garbage collector sometimes keep the legacy containers for a long time if there aren't too many containers on the node. In that case, dockershim will keep performing extra `docker ps` which introduces overhead.
  * Manually remove all legacy containers will fix this.
  * Should we garbage collect legacy containers/sandboxes in dockershim by ourselves? /cc @yujuhong 
* Host port will not be reclaimed for the lack of checkpoint for legacy sandboxes. https://github.com/kubernetes/kubernetes/pull/39903 /cc @freehan 

/cc @yujuhong @feiskyer @dchen1107 @kubernetes/sig-node-api-reviews 
**Release note**:

```release-note
We should mention the caveats of in-place upgrade in release note.
```
2017-02-03 22:17:56 -08:00
Jordan Liggitt c43192c0c1
Add edit command testcases 2017-02-04 00:11:30 -05:00
Jordan Liggitt 9af0dca52d
Log edit errors to stderr 2017-02-04 00:11:30 -05:00
Jordan Liggitt af3505f53c
Add unit test framework for edit command 2017-02-04 00:11:29 -05:00
Kubernetes Submit Queue 67859efaec Merge pull request #40935 from liggitt/sar-subresource
Automatic merge from submit-queue

Plumb subresource through subjectaccessreview

plumb all fields for subjectaccessreview into the resulting `authorizer.AttributesRecord`

```release-note
The SubjectAccessReview API passes subresource and resource name information to the authorizer to answer authorization queries.
```
2017-02-03 18:13:01 -08:00
Christoph Blecker 89d1b09fdf
Move Private Key parsing to k8s.io/client-go/util/cert 2017-02-03 17:41:34 -08:00
ymqytw aadcd9b5e2 filter lastAppliedConfig annotation for describe secret 2017-02-03 17:17:20 -08:00
Kubernetes Submit Queue f20b4fc67f Merge pull request #40655 from vishh/flag-gate-critical-pod-annotation
Automatic merge from submit-queue

Optionally avoid evicting critical pods in kubelet

For #40573

```release-note
When feature gate "ExperimentalCriticalPodAnnotation" is set, Kubelet will avoid evicting pods in "kube-system" namespace that contains a special annotation - `scheduler.alpha.kubernetes.io/critical-pod`
This feature should be used in conjunction with the rescheduler to guarantee availability for critical system pods - https://kubernetes.io/docs/admin/rescheduler/
```
2017-02-03 16:22:26 -08:00
Yu-Ju Hong bb0eb3c33e Fix CRI port forwarding
Websocket support was introduced #33684, which broke the CRI
implementation. This change fixes it.
2017-02-03 15:29:49 -08:00
ymqytw a910284e17 extract util used by jsonmergepatch and SMPatch 2017-02-03 15:28:42 -08:00
Kubernetes Submit Queue 9642104e82 Merge pull request #39914 from kevin-wangzefeng/forgiveness-library-changes
Automatic merge from submit-queue (batch tested with PRs 40696, 39914, 40374)

Forgiveness library changes

**What this PR does / why we need it**:
Splited from #34825, contains library changes that are needed to implement forgiveness:

1. ~~make taints-tolerations matching respect timestamps, so that one toleration can just tolerate a taint for only a period of time.~~ As TaintManager is caching taints and observing taint changes, time-based checking is now outside the library (in TaintManager). see #40355.
2. make tolerations respect wildcard key.
3. add/refresh some related functions to wrap taints-tolerations operation.

**Which issue this PR fixes**: 
Related issue: #1574
Related PR: #34825, #39469 
~~Please note that the first 2 commits in this PR come from #39469 .~~

**Special notes for your reviewer**:

~~Since currently we have `pkg/api/helpers.go` and `pkg/api/v1/helpers.go`, there are some duplicated periods of code laying in these two files.~~

~~Ideally we should move taints-tolerations related functions into a separate package (pkg/util/taints), and make it a unified set of implementations. But I'd just suggest to do it in a follow-up PR after Forgiveness ones done, in case of feature Forgiveness getting blocked to long.~~

**Release note**:

```release-note
make tolerations respect wildcard key
```
2017-02-03 15:05:55 -08:00
Derek Carr d5aa35e330 Add generated artifacts 2017-02-03 17:19:53 -05:00
Derek Carr 04a909a257 Rename cgroups-per-qos flag to not be experimental 2017-02-03 17:10:53 -05:00
Jordan Liggitt 3a89d33306
Plumb subresource through subjectaccessreview 2017-02-03 16:07:55 -05:00
deads2k 0a536544b4 add liggitt to apimachinery/apiserver packages 2017-02-03 12:24:22 -05:00
Kubernetes Submit Queue ab794c6128 Merge pull request #40918 from k82cn/pv_ctrl_typo
Automatic merge from submit-queue

Fixed typo in pv_controller.go

fixes #40916
2017-02-03 07:37:25 -08:00
Andrew Pilloud 3f8505022c Use clientset.Interface for KubeClient 2017-02-03 07:36:16 -08:00
Klaus Ma ef5f838c23 Fixed typo in pv_controller.go 2017-02-03 20:55:15 +08:00
Kubernetes Submit Queue 2bb1e75815 Merge pull request #40863 from kubernetes/sttts-big-genericapiserver-move
Automatic merge from submit-queue (batch tested with PRs 40795, 40863)

Move pkg/genericapiserver and pkg/storage to k8s.io/apiserver

approved based on #40363

These must merge first:
- [x] genericvalidation https://github.com/kubernetes/kubernetes/pull/40810
- [x] openapi https://github.com/kubernetes/kubernetes/pull/40829
- [x] episode 7 https://github.com/kubernetes/kubernetes/pull/40853
2017-02-03 03:48:50 -08:00
Kubernetes Submit Queue 0dcc04d698 Merge pull request #40795 from wojtek-t/use_caching_manager
Automatic merge from submit-queue (batch tested with PRs 40795, 40863)

Use caching secret manager in kubelet

I just found that this is in my local branch I'm using for testing, but not in master :)
2017-02-03 03:48:48 -08:00
tanshanshan bd0ebc9dba add unit test for groupversion 2017-02-03 17:37:42 +08:00
Dr. Stefan Schimanski 6af3210d6f Update generated files 2017-02-03 08:15:46 +01:00
Dr. Stefan Schimanski 536460e1d9 Mechanical fixup imports: pkg/genericapiserver 2017-02-03 08:15:45 +01:00
Dr. Stefan Schimanski 03beed51d6 Mechanical move: pkg/genericapiserver -> k8s.io/apiserver 2017-02-03 07:33:43 +01:00
Dr. Stefan Schimanski 80b96b441b Mechanical import fixup: pkg/storage 2017-02-03 07:33:43 +01:00
Dr. Stefan Schimanski abe993a808 Mechanical move: pkg/storage -> k8s.io/apiserver 2017-02-03 07:33:43 +01:00
Kubernetes Submit Queue 8b795e2396 Merge pull request #38382 from hodovska/init-containers-to-ga
Automatic merge from submit-queue (batch tested with PRs 40864, 40666, 38382, 40874)

Promote init containers to GA

This is proposed for 1.6
PR moves beta proved concept for init containers to stable. Specification of init containers can be now stated under initContainers field in PodSpec/PodTemplateSpec. Specifying init-containers in annotation is still possible, but will be removed in future version.

```release-note
Init containers have graduated to GA and now appear as a field.  The beta annotation value will still be respected and overrides the field value.
```
2017-02-02 21:04:50 -08:00
Kubernetes Submit Queue 99def0d9f9 Merge pull request #40666 from ymqytw/support_generic_merge_patch
Automatic merge from submit-queue (batch tested with PRs 40864, 40666, 38382, 40874)

apply falls back to generic JSON patch computation if no go struct is registered for the target GVK

This PR is the master version of #40096 which is target 1.4 branch.
This PR is based on #40260 

- [x] ensure subkey deletion works in CreateThreeWayJSONMergePatch
- [x] ensure type stomping works in CreateThreeWayJSONMergePatch
- [x] lots of tests for generic json patch computation
- [x] apply falls back to generic 3-way JSON merge patch if no go struct is registered for the target GVK
  - [x] prevent generic apply patch computation between different apiVersions and/or kinds
  - [x] make pruner generic (apply --prune works with TPR)

```release-note
apply falls back to generic 3-way JSON merge patch if no go struct is registered for the target GVK
```
2017-02-02 21:04:49 -08:00
tianshapjq 8057170588 gofmt the service_test.go 2017-02-03 08:55:41 +08:00
Dominika Hodovska adf7cf1934 Init containers in GA - generated code 2017-02-03 01:08:25 +01:00
Random-Liu b9cf8ebe77 Update bazel. 2017-02-02 15:36:24 -08:00
Random-Liu 626680d289 Add unit test for legacy container cleanup 2017-02-02 15:36:24 -08:00
Random-Liu 14940edaad Add legacy container cleanup 2017-02-02 15:36:24 -08:00
Dominika Hodovska a856188b96 Show InitContainers and InitContainerStatus in PodSpec 2017-02-03 00:25:47 +01:00
ymqytw ad7ffd79c3 apply falls back to generic 3-way JSON merge patch if no go struct is registered for the target GVK 2017-02-02 15:19:50 -08:00
Kubernetes Submit Queue c84f3abca1 Merge pull request #40571 from jcbsmpsn/close-watch
Automatic merge from submit-queue

Release API watch resources when done.
2017-02-02 14:10:10 -08:00
Luca Bruno 85b1def175
test: update to use mounttest:0.8 and mounttest-user:0.5 2017-02-02 20:41:18 +00:00
Wojciech Tyczynski 6f3acb801d Fix bug in secret manager. 2017-02-02 21:39:26 +01:00
Vishnu kannan 77a88f7e8b update critical pod annotation flag gate to mention that BestEffort pods are not supported
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-02 11:32:23 -08:00
Vishnu Kannan c967ab7b99 Avoid evicting critical pods in Kubelet if a special feature gate is enabled
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-02 11:32:20 -08:00
Mike Danese e34351f715 refactor approver and signer interfaces to be consisten w.r.t. apiserver interaction
This makes it so that only the controller loop talks to the
API server directly. The signatures for Sign and Approve also
become more consistent, while allowing the Signer to report
conditions (which it wasn't able to do before).
2017-02-02 11:23:52 -08:00
Vishnu Kannan 6ddb528446 Revert "Sort critical pods before admission"
This reverts commit b7409e0038.
2017-02-02 10:41:24 -08:00
Vishnu Kannan ffd7dda234 Revert "Kubelet admits critical pods even under memory pressure"
This reverts commit afd676d94c.
2017-02-02 10:41:24 -08:00
Vishnu Kannan a3ae8c2b21 Revert "assign -998 as the oom_score_adj for critical pods."
This reverts commit 53931fbce4.
2017-02-02 10:41:21 -08:00
Yu-Ju Hong 999f8dff8e Remove the temporary fix for pre-1.0 mirror pods 2017-02-02 10:37:19 -08:00
Vishnu Kannan b8a63537dd Revert "Don't evict static pods"
This reverts commit 1743c6b6ab.
2017-02-02 10:29:12 -08:00
Minhan Xia 51526d3103 Add checkpointHandler to DockerService 2017-02-02 10:19:34 -08:00
Minhan Xia 344d2f591f add checkpoint structures for dockershim 2017-02-02 10:18:37 -08:00
Jacob Simpson cf31d9413e Release API watch resources when done. 2017-02-02 10:17:08 -08:00
Kubernetes Submit Queue d6f7ae2ffb Merge pull request #40840 from janetkuo/ds-owner-file
Automatic merge from submit-queue

Update daemon set controller OWNERS file

Adding myself as reviewer, adding @mikedanese as approver 
cc @kargakis @lukasredynk
2017-02-02 09:54:06 -08:00
Kubernetes Submit Queue 62c9cb4684 Merge pull request #40853 from sttts/sttts-more-cutoffs-7
Automatic merge from submit-queue (batch tested with PRs 35782, 35831, 39279, 40853, 40867)

genericapiserver: cut off more dependencies – episode 7

Follow-up of https://github.com/kubernetes/kubernetes/pull/40822

approved based on #40363
2017-02-02 09:53:52 -08:00
Kubernetes Submit Queue 9721459536 Merge pull request #39279 from andrewsykim/kubectl-get-hpa-show-current-replicas
Automatic merge from submit-queue (batch tested with PRs 35782, 35831, 39279, 40853, 40867)

kubectl get hpa should print number of replicas

**What this PR does / why we need it**:
Prints number of replicas on deployment managed by HPA. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
None, couldn't find one related.

**Special notes for your reviewer**:
Couldn't find any tests for validating kubectl output for hpa, if there are please point me to them and I will add. 

**Release note**:

```release-note
```
2017-02-02 09:53:50 -08:00
Kubernetes Submit Queue f66679a4e9 Merge pull request #35782 from piosz/remove-hpa-ext
Automatic merge from submit-queue

Removed HPA objects from extensions api group

fix #29778

``` release-note
HorizontalPodAutoscaler is no longer supported in extensions/v1beta1 version. Use autoscaling/v1 instead.
```

 cc @kubernetes/autoscaling
2017-02-02 09:42:33 -08:00
Kubernetes Submit Queue 9e427c88c4 Merge pull request #40859 from jsafrane/ps-scheduler-event
Automatic merge from submit-queue (batch tested with PRs 40855, 40859)

PV binding: send an event when there are no PVs to bind

This is similar to scheduler that says "no nodes available to schedule pods"
when it can't schedule a pod.

@kubernetes/sig-storage-pr-reviews
2017-02-02 09:01:48 -08:00
Kubernetes Submit Queue c26bd88620 Merge pull request #40695 from vladimirvivien/vvivien-fix-volname-overwrite
Automatic merge from submit-queue (batch tested with PRs 40810, 40695)

Prevent pv controller from forcefully overwrite provisioned volume name

**What this PR does / why we need it**:
This PR adds a fix to prevents the PV controller from forcefully overwriting the provisioned volume's name with the generated PV name.  Instead, it overwrites the volume's name only when it is missing.  This allows dynamic provisioner implementers to set the name of the volume to a value that they choose.

**Which issue this PR fixes** 
This PR does not have an issue affiliated, but it will allow PR #38924 to properly implement dynamically provisioned volume in namespaces other than default.
2017-02-02 08:07:48 -08:00
Kubernetes Submit Queue 70c97b2c28 Merge pull request #40810 from deads2k/generic-37-generic-validation
Automatic merge from submit-queue (batch tested with PRs 40810, 40695)

move genericvalidation to apimachinery

Moves genericvalidation to apimachinery.  The first commit shows the snip I made.

@sttts
2017-02-02 08:07:47 -08:00
Wojciech Tyczynski ec6a95a665 Use caching secret manager in kubelet 2017-02-02 15:32:07 +01:00
Piotr Szczesniak 868118d49f Autogenerated changes 2017-02-02 15:26:10 +01:00
Dr. Stefan Schimanski de2eee391a Update bazel 2017-02-02 15:19:04 +01:00
Dr. Stefan Schimanski b8142896a7 pkg/genericapiserver: cut off pkg/registry/cachesize dependency 2017-02-02 15:19:03 +01:00
Dr. Stefan Schimanski bfe0d50ce8 pkg/genericapiserver/server: cut off from pkg/api 2017-02-02 15:19:01 +01:00
Dr. Stefan Schimanski 1834013f3e pkg/genericapiserver/registry/generic/registry: cut off pkg/api dependency 2017-02-02 15:17:34 +01:00
Dr. Stefan Schimanski ef8bb4e7e7 Move pkg/api.FinanlizerOrphan into metav1 2017-02-02 15:17:34 +01:00
Dr. Stefan Schimanski 871fc426b3 pkg/storage: move errors here from pkg/api/errors/storage 2017-02-02 15:17:34 +01:00
Kubernetes Submit Queue 0e5cda9893 Merge pull request #40829 from mbohlool/separation
Automatic merge from submit-queue

Move post processing/backward compatibility of openapi out of generic package

Post processing step was put into generic package and was the same for both k8s api server and federation api server. They have different backward compatibility list of types. This PR move that step out of generic package and put it in each server's file.
2017-02-02 06:15:30 -08:00
Kubernetes Submit Queue 4a4678aafa Merge pull request #40822 from sttts/sttts-more-cutoffs-6
Automatic merge from submit-queue

genericapiserver: cut off more dependencies – episode 6

Follow-up of https://github.com/kubernetes/kubernetes/pull/40808

approved based on #40363
2017-02-02 05:10:10 -08:00
Piotr Szczesniak a35ad8f6ba Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
deads2k 46767fcbac move genericvalidation to apimachinery 2017-02-02 07:37:00 -05:00
deads2k 9cbf557c07 snip validation link back to pkg/api 2017-02-02 07:35:51 -05:00
Jan Safranek 13546e5ea4 PV binding: send an event when there are no PVs to bind
This is similar to scheduler that says "no nodes available to schedule pods"
when it can't schedule a pod.
2017-02-02 13:30:53 +01:00
Kubernetes Submit Queue 4ecd52b8ac Merge pull request #40720 from janetkuo/ds-event
Automatic merge from submit-queue (batch tested with PRs 40556, 40720)

Emit events on 'Failed' daemon pods

Follow up #40330 @erictune @mikedanese @kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-02-02 03:21:06 -08:00
Dr. Stefan Schimanski 3811384a32 Update bazel 2017-02-02 11:16:29 +01:00
Dr. Stefan Schimanski 9180de9072 pkg/storage/storagebackend/factory: cut off pkg/api dependency 2017-02-02 11:16:28 +01:00
Dr. Stefan Schimanski 0e2b2048b2 pkg/storage/etcd3: cut off pkg/api dependency 2017-02-02 11:16:28 +01:00
Dr. Stefan Schimanski 2f9fa55c6f pkg/storage/etcd: cut off pkg/api scheme 2017-02-02 11:16:28 +01:00
Kubernetes Submit Queue 01ac994541 Merge pull request #40689 from deads2k/add-details-to-patch-err
Automatic merge from submit-queue (batch tested with PRs 39169, 40719, 38954, 40808, 40689)

add details to patch conflict

Adds conflict details to the patch message so we can debug #39471.  Seems like this may have general utility since others may also wonder what they conflicted on.

@sig-api
2017-02-02 02:05:24 -08:00
Kubernetes Submit Queue f316afd39c Merge pull request #40808 from sttts/sttts-more-cutoffs-5
Automatic merge from submit-queue (batch tested with PRs 39169, 40719, 38954, 40808, 40689)

genericapiserver: cut off more dependencies – episode 5

Follow-up of https://github.com/kubernetes/kubernetes/pull/40658

Left for episode 6:
- pkg/storage/etc
- pkg/storage/etc3
- pkg/storage/storagebackend/factory

approved based on #40363
2017-02-02 02:05:22 -08:00
Kubernetes Submit Queue 6685d3c022 Merge pull request #38954 from slaskawi/statefulsets/add_service_level_tests
Automatic merge from submit-queue (batch tested with PRs 39169, 40719, 38954, 40808, 40689)

Add StatefulSets checks at Service level

Hi!

Please let me propose some very small e2e testsuite enhancement. 

This PR removed a `TODO` about checking governing service at unit test level (which is hard) and adds this to e2e testsuite.

Thanks
Sebastian
2017-02-02 02:05:21 -08:00
mbohlool 7c4faba1a1 Update bazel 2017-02-02 00:37:37 -08:00
mbohlool 9623d05f79 Move post processing/backward compatibility of openapi out of generic package 2017-02-02 00:37:36 -08:00
Kubernetes Submit Queue 0477100f98 Merge pull request #33684 from fraenkel/port_forward_ws
Automatic merge from submit-queue

Add websocket support for port forwarding

#32880

**Release note**:
```release-note
Port forwarding can forward over websockets or SPDY.
```
2017-02-01 23:19:02 -08:00
Kubernetes Submit Queue c92f29a455 Merge pull request #40624 from smarterclayton/storage_options
Automatic merge from submit-queue (batch tested with PRs 39217, 40624)

Allow StorageFactory to wrap encoders and decoders
2017-02-01 22:28:40 -08:00
Dr. Stefan Schimanski ad3dc2584f Update generated files 2017-02-02 06:58:58 +01:00
Dr. Stefan Schimanski bbb5fbf3b3 pkg/genericapiserver/registry/rest/resttest: cut off pkg/api dependency 2017-02-02 06:58:30 +01:00
Dr. Stefan Schimanski 875ed5f5ef pkg/genericapiserver/registry/rest: cut off pkg/api dependency 2017-02-02 06:58:30 +01:00
Dr. Stefan Schimanski a5d5527e96 pkg/genericapiserver/endpoints: cutting off pkg/api deps 2017-02-02 06:58:29 +01:00
Dr. Stefan Schimanski b51252ab5b Update protobufs 2017-02-02 06:58:29 +01:00
Dr. Stefan Schimanski 161ca53f49 k8s.io/apiserver: add example api group 2017-02-02 06:58:28 +01:00
Dr. Stefan Schimanski 55466b51bf pkg/api/testing: cut off fuzzers from static codecs 2017-02-02 06:58:28 +01:00
Kubernetes Submit Queue 331a558cc4 Merge pull request #37617 from yarntime/fix_typo_in_daemon
Automatic merge from submit-queue (batch tested with PRs 37617, 40197)

fix typo in daemon

fix typo in daemon.
2017-02-01 20:46:37 -08:00
Janet Kuo c39517778d Update daemon controller OWNERS file 2017-02-01 18:31:26 -08:00
Michael Fraenkel f07f5a4cc3 Generated code 2017-02-01 18:03:47 -07:00
Michael Fraenkel 93c11422e4 CRI Portforward needs to forward websocket ports
- adjust ports to int32
- CRI flows the websocket ports as query params

- Do not validate ports since the protocol is unknown
  SPDY flows the ports as headers and websockets uses query params
- Only flow query params if there is at least one port query param
2017-02-01 18:03:42 -07:00
Kubernetes Submit Queue 80b21d2d4b Merge pull request #40806 from deads2k/generic-36-nodep
Automatic merge from submit-queue (batch tested with PRs 40574, 40806, 40308, 40771, 39440)

move api server no kube dep packages

Simple moves, see commit titles.  I did not move the source of the generated swagger, I simply change the destination of the script.  I'm ok building a little debt to complete the move.

@sttts
2017-02-01 16:12:45 -08:00
Kubernetes Submit Queue 4bffae39cb Merge pull request #40574 from yujuhong/mv_securitycontext
Automatic merge from submit-queue

securitycontext: move docker-specific logic into kubelet/dockertools

This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-02-01 15:31:49 -08:00
Rene Treffer 42ff859c27 Allow multipe DNS servers as comma-seperated argument for --dns
Depending on an exact cluster setup multiple dns may make sense.
Comma-seperated lists of DNS server are quite common as DNS servers
are always plain IPs.
2017-02-01 22:38:40 +01:00
Kubernetes Submit Queue 7165fe6e9e Merge pull request #39145 from NickrenREN/podpair
Automatic merge from submit-queue (batch tested with PRs 40758, 39145, 40776)

remove duplicate function notes
2017-02-01 13:30:39 -08:00
Kubernetes Submit Queue 5470d72780 Merge pull request #40595 from liggitt/ecdsa-params
Automatic merge from submit-queue (batch tested with PRs 40124, 39216, 40561, 40595, 40735)

Allow reading ECDSA key files containing parameter blocks

Fixes #40589
2017-02-01 12:32:49 -08:00
deads2k 6b57489552 move apiserver options 2017-02-01 15:18:33 -05:00
deads2k 9597cb150d move swagger route to apiserver 2017-02-01 15:18:32 -05:00
Kubernetes Submit Queue c523476d6f Merge pull request #40124 from mbohlool/separation
Automatic merge from submit-queue

Use full package path for definition name in OpenAPI spec

We were using short package name (last part of package name) plus type name for OpenAPI spec definition name. That can result in duplicate names and make the spec invalid. To be sure we will always have unique names, we are going to use full package name as definition name. Also "x-kubernetes-tag" custom field is added to definitions to list Group/Version/Kind for the definitions that has it. This will help clients to discover definitions easier.
Lastly, we've added a reference from old definition names to the new ones to keep backward compatibilities. The list of old definitions will not be updated.

**Release note**:
- Rename OpenAPI definition names to type's full package names to prevent duplicates
- Create OpenAPI extension "x-kubernetes-group-version-kind" for definitions to store Group/Version/Kind
- Deprecate old definition names and create a reference to the new definitions. Old definitions will be removed in the next release.
2017-02-01 12:06:39 -08:00
Janet Kuo f531bf205a Address comments 2017-02-01 11:37:48 -08:00
Janet Kuo 7074d2fd39 Emit events on 'Failed' daemon pods 2017-02-01 11:37:48 -08:00
Clayton Coleman 494eeaaa8e
Allow StorageFactory to wrap encoders and decoders
Prepares for allowing encryption at rest of resources as well as any
other lower level optimization we might chose to implement.

Also cleans up a bunch of ugly code.
2017-02-01 12:37:55 -05:00
Vladimir Vivien 8ebed57767 Prevent pv controller from forcefully overwrite provisioned volume name
This fix prevents the PV controller from forcefully overwriting the provisioned volume's name with the generated PV name.  Instead, it allows dynamic provisioner implementers to set the name of the volume to a value that they choose.
2017-02-01 12:19:20 -05:00
Kubernetes Submit Queue cb758738f9 Merge pull request #40265 from feiskyer/cri-verify
Automatic merge from submit-queue

CRI: verify responses from remote runtime

Closes #40264.
2017-02-01 08:41:15 -08:00
Jordan Liggitt ff124c4aec
Allow reading ECDSA key files containing parameter blocks 2017-02-01 10:18:58 -05:00
Jan Safranek 587eb199e0 Remove alpha provisioning 2017-02-01 14:51:54 +01:00
Michael Fraenkel beb53fb71a Port forward over websockets
- split out port forwarding into its own package

Allow multiple port forwarding ports
- Make it easy to determine which port is tied to which channel
- odd channels are for data
- even channels are for errors

- allow comma separated ports to specify multiple ports

Add  portfowardtester 1.2 to whitelist
2017-02-01 06:32:04 -07:00
Dr. Stefan Schimanski 7a6366bea0 Update bazel 2017-02-01 13:49:28 +01:00
Dr. Stefan Schimanski 32ca6c2f97 pkg/genericapiserver/endpoint/filters: cut off from pkg/api and pkg/apis 2017-02-01 13:47:59 +01:00
Dr. Stefan Schimanski 668f74b96e pkg/storage/storagebackend/factory: cut off from testapi 2017-02-01 13:43:55 +01:00
Dr. Stefan Schimanski f975be679c pkg/genericapiserver/endpoints: cut off extensions api dep 2017-02-01 13:43:55 +01:00
Dr. Stefan Schimanski 15b484859d pkg/genericapiserver/server: cut off pkg/api dependencies from test 2017-02-01 13:43:50 +01:00
Dr. Stefan Schimanski d6adb51e6c pkg/api: move HasObjectMetaSystemFieldValues into apimachinery 2017-02-01 13:37:41 +01:00
Sebastian Laskawiec 7c7ca34246 Add StatefulSets checks at Service level 2017-02-01 11:29:40 +01:00
Kubernetes Submit Queue 914c57eb52 Merge pull request #40749 from deads2k/generic-35-options
Automatic merge from submit-queue

remove unneeded storage options

Cleanup of some storage serialization options that only kube and federation api server (and maybe not even that one) need.

You may have called it a snip, but this moves the options out of generic entirely.
2017-02-01 01:53:27 -08:00
Kubernetes Submit Queue 9807cd7d06 Merge pull request #40630 from liggitt/apply-null
Automatic merge from submit-queue (batch tested with PRs 40529, 40630)

propagate explicit nulls in apply

Rebase of https://github.com/kubernetes/kubernetes/pull/35496 on top of https://github.com/kubernetes/kubernetes/pull/40260

The client-side propagation of the raw value is no longer needed, since the client is preserving the original object in unstructured form (explicit nulls are preserved).

Kept tests and CreateThreeWayMergePatch changes from https://github.com/kubernetes/kubernetes/pull/35496

```release-note
kubectl apply now supports explicitly clearing values not present in the config by setting them to null
```

- [x] Clean up orphaned objects in test-cmd to preserve pre- and post- conditions
- [x] improve CreateThreeWayMergePatch test to not filter based on string comparison to test name
2017-02-01 00:16:39 -08:00
Kubernetes Submit Queue 61d45f5900 Merge pull request #40541 from fabianofranz/fix_sorting_printer_with_missing_fields
Automatic merge from submit-queue (batch tested with PRs 40645, 40541, 40769)

Fix sorting printer when sorting by a missing field

**What this PR does / why we need it**:

When calling `kubectl get` with the `--sort-by` flag, the command will error out if the field used for sorting is not present in at least one of the objects returned in the list, *even if it is a field valid in the object's model*. 

For example, taking a list of `ReplicationController` where one of them has `status: { replicas: 0 }` (so nothing in `status.availableReplicas`, even that being a valid object in the model and present in every other object of the list) :

```
$ oc get rc --sort-by=status.availableReplicas
error: availableReplicas is not found
```

This PR now traverses the entire list of objects to be sorted and, if at least one has the field provided in `--sort-by`, we sort correctly and consider the field empty in every other object where the field is not present. If none of the objects has the field, we error out (that will catch really invalid fields, and valid ones but not present in any object in the list, which is acceptable). No swagger validation here.

**Release note**:
```release-note
Fixed an issue where 'kubectl get --sort-by=' would return an error when the specified field were not present in at least one of the returned objects, even that being a valid field in the object model.
```
2017-01-31 22:00:38 -08:00
Kubernetes Submit Queue 5eef12700c Merge pull request #40645 from brendandburns/fr
Automatic merge from submit-queue

Add initial french translations for kubectl

Add initial French translations, mostly as an example of how to add a new language.

@fabianofranz @kubernetes/sig-cli-pr-reviews
2017-01-31 21:27:52 -08:00
Kubernetes Submit Queue 9ae2dfacf1 Merge pull request #40763 from derekwaynecarr/log-noise-aws
Automatic merge from submit-queue (batch tested with PRs 40638, 40742, 40710, 40718, 40763)

Reduce log noise when aws cloud cannot find public-ip4 metadata

**What this PR does / why we need it**:
The PR removes excessive log spam produced by the aws cloud provider for normal operating conditions.

**Which issue this PR fixes** 
fixes https://github.com/kubernetes/kubernetes/issues/23155

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-01-31 20:40:47 -08:00
Kubernetes Submit Queue dcf26ed855 Merge pull request #40718 from janetkuo/secret-volume-describe-fix
Automatic merge from submit-queue (batch tested with PRs 40638, 40742, 40710, 40718, 40763)

Fix formatting issue of secret volume describer

Fixing a `kubectl describe` bug

**Before**:

```yaml
...
Volumes:
  default-token-z7g96:
    Type:       Secret (a volume populated by a Secret)
    SecretName:     Optional:   %v

%!(EXTRA string=default-token-z7g96, bool=false)QoS Class:      BestEffort
...
```

**After**:

```yaml
...
Volumes:
  default-token-z7g96:
    Type:       Secret (a volume populated by a Secret)
    SecretName: default-token-z7g96
    Optional:   false
QoS Class:      BestEffort
...
```
2017-01-31 20:40:46 -08:00
Kubernetes Submit Queue 76550cf2de Merge pull request #40710 from deads2k/client-21-record
Automatic merge from submit-queue (batch tested with PRs 40638, 40742, 40710, 40718, 40763)

move client/record

An attempt at moving client/record to client-go.  It's proving very stubborn and needs a lot manual intervention and near as I can tell, no one actually gets any benefit from the sink and source complexity it adds.

@sttts @caesarchaoxu
2017-01-31 20:40:45 -08:00
Kubernetes Submit Queue 0469fc6fb6 Merge pull request #40742 from deads2k/generic-34-storage
Automatic merge from submit-queue (batch tested with PRs 40638, 40742, 40710, 40718, 40763)

move pkg/storage to apiserver

Mechanical move of `pkg/storage` (not sub packages) to `k8s.io/apiserver`.

@sttts
2017-01-31 20:40:43 -08:00
Kubernetes Submit Queue d399924b69 Merge pull request #40638 from yujuhong/rm_label
Automatic merge from submit-queue

kuberuntime: remove the kubernetesManagedLabel label

The CRI shim should be responsible for returning only those
containers/sandboxes created through CRI. Remove this label in kubelet.
2017-01-31 19:40:20 -08:00
Kubernetes Submit Queue 32d79c3461 Merge pull request #39443 from freehan/cri-hostport
Automatic merge from submit-queue (batch tested with PRs 40111, 40368, 40342, 40274, 39443)

refactor hostport logic

Refactor hostport logic to avoid using api.Pod object directly.
2017-01-31 19:18:44 -08:00
Kubernetes Submit Queue 8fe7a2decb Merge pull request #40342 from louyihua/remove_warning
Automatic merge from submit-queue (batch tested with PRs 40111, 40368, 40342, 40274, 39443)

Eliminate "Unknown service type: ExternalName"

When creating an ExternalName service, rest.go still generate the warning message "Unknown service type: ExternalName". This should be eliminated as this type of service is supported now.
2017-01-31 19:18:41 -08:00
Kubernetes Submit Queue c09311fa32 Merge pull request #40111 from juanvallejo/jvallejo/add-ensure-print-headers
Automatic merge from submit-queue

Add printer#EnsurePrintHeaders method

This patch adds a new `EnsurePrintHeaders` method to the
HumanReadablePrinter `ResourcePrinter`, which allows headers to be
printed in cases where multiple lists of the same resource are printed
consecutively, but are separated by non-printer related information.

Related downstream PR: https://github.com/openshift/origin/pull/12528

**Release note**:
```release-note
release-note-none
```

cc @fabianofranz @AdoHe
2017-01-31 18:53:27 -08:00
deads2k a106d9f848 switch kubelet to use external (client-go) object references for events 2017-01-31 19:15:33 -05:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k 1ef5d26079 move pkg/storage to apiserver 2017-01-31 19:07:33 -05:00
Kubernetes Submit Queue 36809e2c2e Merge pull request #39366 from zdj6373/manager-log
Automatic merge from submit-queue (batch tested with PRs 40527, 40738, 39366, 40609, 40748)

Log rectification

Log error, modify
2017-01-31 15:49:43 -08:00
Kubernetes Submit Queue adbb975389 Merge pull request #40738 from deads2k/client-18-portforward
Automatic merge from submit-queue (batch tested with PRs 40527, 40738, 39366, 40609, 40748)

move portforward to client-go

Second to last one.  I had to split some tests like we did for apimachinery, but they still run in kubernetes.

@sttts
2017-01-31 15:49:42 -08:00
Kubernetes Submit Queue 31df7e411c Merge pull request #40527 from php-coder/docker_manager_cleanup
Automatic merge from submit-queue (batch tested with PRs 40527, 40738, 39366, 40609, 40748)

pkg/kubelet/dockertools/docker_manager.go: removing unused stuff

This PR removes unused constants and variables. I checked that neither kubernetes nor openshift code aren't using them.
2017-01-31 15:49:37 -08:00
Derek Carr 6d73112d5b Reduce log noise when aws cloud cannot find public-ip4 metadata 2017-01-31 17:28:49 -05:00
Jordan Liggitt cf74abd892
fixup apply null tests 2017-01-31 15:00:23 -05:00
Anastasis Andronidis 4bdcc03c0b
test for explicit null value propagation in apply 2017-01-31 14:22:24 -05:00
deads2k 700c30f3c7 move portforward to client-go 2017-01-31 14:13:35 -05:00
Kubernetes Submit Queue 86d561424d Merge pull request #40740 from liggitt/client-gen-comments
Automatic merge from submit-queue (batch tested with PRs 38772, 38797, 40732, 40740)

Prevent spurious diff in all generated clients when adding new group/version

Including custom arguments in the generated file comment means adding any new group/version results in a diff of all generated clients in all groups/versions

@ncdc PTAL
2017-01-31 11:00:56 -08:00
Kubernetes Submit Queue 1cd06fbcf0 Merge pull request #38797 from aaron12134/spell-obsession
Automatic merge from submit-queue (batch tested with PRs 38772, 38797, 40732, 40740)

Synchronous spellcheck for pkg/volume/*

**What this PR does / why we need it**: Increase code readability

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**: Minor contribution 

**Release note**:

```release-note
```
2017-01-31 11:00:47 -08:00
deads2k 384c873914 remove unneeded storage options 2017-01-31 13:44:39 -05:00
Humble Chirammal 9c7c2dcd20 Renames provisioner config struct
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-01-31 23:04:32 +05:30
Jordan Liggitt aa4a3e1613
Regenerate clients 2017-01-31 11:16:27 -05:00
Kevin b410f3f4c2 address review comments 3 2017-01-31 21:39:17 +08:00
Kevin 3c550c32fb address review comments 2 2017-01-31 21:39:17 +08:00
Kevin 6a2ef1646b address review comments 2017-01-31 21:39:17 +08:00
Kevin 36dcb57407 forgiveness library changes 2017-01-31 21:39:17 +08:00
Kubernetes Submit Queue 16164c6a54 Merge pull request #40711 from spxtr/owner
Automatic merge from submit-queue

Remove spxtr from several owners files, add rmmh as test reviewer.

**Release note**:
```release-note
NONE
```
2017-01-31 05:03:53 -08:00
Kubernetes Submit Queue 3e81148c55 Merge pull request #40083 from soltysh/remove_extjobs
Automatic merge from submit-queue (batch tested with PRs 40405, 38601, 40083, 40730)

Remove extensions/v1beta1.Jobs leftover

It looks like I missed this one file when removing `extensions/v1beta1.Jobs` last time (#38614).

@caesarxuchao ptal, since you were reviewing last time
@kubernetes/sig-api-machinery-misc fyi
2017-01-31 04:44:43 -08:00
Kubernetes Submit Queue 90a382864e Merge pull request #40405 from vwfs/azure_lb_readonly_fix
Automatic merge from submit-queue

Set NetworkInterfaces and Subnets to nil before updating Azure security groups

**What this PR does / why we need it**: This is a workaround until we have an upstream fix in azure-sdk-for-go/go-autorest. Corresponding issues are https://github.com/kubernetes/kubernetes/issues/40332 and https://github.com/Azure/go-autorest/issues/112

In k8s 1.5.2, an update to azure-sdk-for-go was cherry-picked, which broke creation/updating of LBs on Azure. As we should have it back to a working state ASAP, I'd like to do a workaround for now and later when the upstream fix comes in, remove the workaround again.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40332

**Release note**:

```release-note
Fix failing load balancers in Azure
```

CC @colemickens
2017-01-31 04:19:05 -08:00
Kubernetes Submit Queue fe01eef0bb Merge pull request #39242 from NickrenREN/kuberuntime-manager
Automatic merge from submit-queue (batch tested with PRs 40392, 39242, 40579, 40628, 40713)

optimize podSandboxChanged() function and fix some function notes
2017-01-31 01:16:51 -08:00
Kubernetes Submit Queue ac29a05908 Merge pull request #40392 from madhusudancs/federation-kubefed-rbac
Automatic merge from submit-queue (batch tested with PRs 40392, 39242, 40579, 40628, 40713)

[Federation][kubefed] Create a dedicated service account for federation controller manager in the host cluster and give it appropriate permissions.

Ref: Issue #39555

cc @kubernetes/sig-federation-pr-reviews @kubernetes/sig-auth-misc @kubernetes/sig-auth-pr-reviews 

```release-note
kubefed init creates a service account for federation controller manager in the federation-system namespace and binds that service account to the federation-system:federation-controller-manager role that has read and list access on secrets in the federation-system namespace. 
```
2017-01-31 01:16:48 -08:00
Kubernetes Submit Queue 0c15857a1d Merge pull request #40145 from nebril/iptables-util-unit-tests
Automatic merge from submit-queue (batch tested with PRs 38443, 40145, 40701, 40682)

pkg/util/iptables missing unit tests
2017-01-30 20:59:42 -08:00
Kubernetes Submit Queue 564016bd9f Merge pull request #38443 from NickrenREN/vol-mgr-getVolumeInUse
Automatic merge from submit-queue (batch tested with PRs 38443, 40145, 40701, 40682)

fix GetVolumeInUse() function

Since we just want to get volume name info, each volume name just need to added once.  desiredStateOfWorld.GetVolumesToMount() will return volume and pod binding info,
if one volume is mounted to several pods, the volume name will be return several times. That is not what we want in this function.
We can add a new function to only get the volume name info  or judge whether the volume name is added to the desiredVolumesMap array.
2017-01-30 20:59:38 -08:00
mbohlool 32e1ef9a87 Update Bazel 2017-01-30 20:05:21 -08:00
mbohlool 2c9475c2cb Update generated OpenAPI specs 2017-01-30 20:05:20 -08:00
mbohlool 300b28354c Add backward compatibility to OpenAPI spec for renamed definitions 2017-01-30 20:05:19 -08:00
mbohlool 239169a5a4 Use full package path as definition name in OpenAPI 2017-01-30 20:05:18 -08:00
Kubernetes Submit Queue 553438e90a Merge pull request #40700 from liggitt/lister-gen-cleanup
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

Clean up generated comment for lister/informers

The generated comment including the command line means the addition of a new group/version touches all listers/informers, not just the ones for the new group/version

@ncdc PTAL
2017-01-30 19:14:44 -08:00
Kubernetes Submit Queue fe992b7902 Merge pull request #40683 from wojtek-t/protobufs_by_default
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

Enable protobufs as storage format by default

**Release note**:

```release-note
Change default storage format to protobufs. With this PR apiserver will be writing objects serialized as protobufs to etcd. If the apiserver was upgraded in the existing clusters, until an object will be written, it will still be stored as JSON. Apiserver can deal with some data being in json and some in protobuf format as of 1.4 release.
```

@kubernetes/sig-api-machinery-misc @kubernetes/sig-api-machinery-pr-reviews
2017-01-30 19:14:42 -08:00
Kubernetes Submit Queue 25de8ef641 Merge pull request #40551 from juanvallejo/jvallejo/only-output-no-resources-found-for-human-readable-printer
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

only output "No resources found." for human readable printers

**Release note**:
```release-note
release note none
```

This patch removes the message `No resources found` (currently printed through stderr) when printing through a generic / non-human-readable printer (json, yaml, jsonpath, custom-columns).

**Before***
```
$ kubectl get pods -o json
No resources found.
{
    "apiVersion": "v1",
    "items": [],
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
}
```

**After**
```
$ kubectl get pods -o json
{
    "apiVersion": "v1",
    "items": [],
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
}
```

cc @fabianofranz @stevekuznetsov
2017-01-30 19:14:41 -08:00
Janet Kuo d76683be22 Fix formatting issue of secret volume describer 2017-01-30 18:40:12 -08:00
Kubernetes Submit Queue 9574ef54ec Merge pull request #40618 from janetkuo/patch-resource-name
Automatic merge from submit-queue (batch tested with PRs 40703, 40093, 40618, 40659, 39810)

Print resource name when patch is done

Before:
```console
$ kubectl patch deployment nginx -p '{"spec":{"progressDeadlineSeconds":200}}'
"nginx" patched
```

After:
```console
$ kubectl patch deployment nginx -p '{"spec":{"progressDeadlineSeconds":200}}'
deployment "nginx" patched
```
2017-01-30 17:14:54 -08:00
Minhan Xia 548a6122c5 rename HostportHandler to HostportSyncer 2017-01-30 16:30:06 -08:00
Madhusudan.C.S 05a0f64903 Address review comments. 2017-01-30 14:31:15 -08:00
Joe Finney 3ec286adda Remove spxtr from several owners files, add rmmh as test reviewer. 2017-01-30 13:45:21 -08:00
Jordan Liggitt c4e52d3df2
Regenerate listers/informers 2017-01-30 15:46:36 -05:00
Wojciech Tyczynski dae29625da Enable protobufs in etcd by default 2017-01-30 20:14:06 +01:00
deads2k c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Kubernetes Submit Queue 1b9f89691a Merge pull request #34533 from yuexiao-wang/fix-commends
Automatic merge from submit-queue

Update function name for public function in commend

**What this PR does / why we need it**:
Update function name for public function in commend and fix some typos in log information.

Signed-off-by: yuexiao-wang wang.yuexiao@zte.com.cn
2017-01-30 09:05:22 -08:00
deads2k 8a61368a60 add details to patch conflict 2017-01-30 11:21:42 -05:00
Kubernetes Submit Queue 3dbbd0bdf4 Merge pull request #40606 from deads2k/client-17-sync
Automatic merge from submit-queue (batch tested with PRs 34543, 40606)

sync client-go and move util/workqueue

The vision of client-go is that it provides enough utilities to build a reasonable controller.  It has been copying `util/workqueue`.  This makes it authoritative.

@liggitt I'm getting really close to making client-go authoritative ptal.

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-30 08:19:10 -08:00
Kubernetes Submit Queue 914402281b Merge pull request #40673 from kargakis/unit-test-fix
Automatic merge from submit-queue

controller: don't run informers in unit tests when unnecessary

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

@mfojtik it seems that using informers makes the deployment sync for the initial relist so this races with the enqueue that these tests are testing.
2017-01-30 06:44:54 -08:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Kubernetes Submit Queue 2cb17cc677 Merge pull request #40426 from sttts/sttts-more-cutoffs-3
Automatic merge from submit-queue

genericapiserver: cut off more dependencies – episode 3

Compare commit subjects.

This is the first step to get `apiserver_test.go` and `watch_test.go` in `pkg/genericapiserver/endpoints` cutoff from k8s.io/kubernetes dependencies.

After this we have to sync client-go and then "episode 4" can go in.

approved based on #40363
2017-01-30 05:57:49 -08:00
Kubernetes Submit Queue 6e92d41a83 Merge pull request #40663 from sttts/sttts-readd-generic-features
Automatic merge from submit-queue

pkg/genericapiserver: re-add generic feature gates

https://github.com/kubernetes/kubernetes/pull/40543 removed the kubernetes feature gates (which subsume the generic ones) from genericapiserver. This PR readds the generic ones again.

This is not strictly necessary for kube-apiserver. But some other downstream project without its own feature gates needs this.
2017-01-30 05:11:48 -08:00
Michail Kargakis 5ccc6d2727 controller: don't run informers in unit tests when unnecessary 2017-01-30 11:36:49 +01:00
Brendan Burns 45ade78eb3 Add initial french translations as an example. 2017-01-29 22:56:48 -08:00
Kubernetes Submit Queue 5b88f0e1de Merge pull request #40538 from vmware/fixvSphereDeleteVolume
Automatic merge from submit-queue

Adding vmdk file extension for vmDiskPath in vsphere DeleteVolume

**What this PR does / why we need it**:
This fix is required to handle situation when volume path is not set with vmdk file extension.
DiskAttach call does not require vmdk file extension to be explicitly set in the file path, so in PV yaml file, users have option to set such file path.

Issue happens when such PV is created with persistentVolumeReclaimPolicy set to Delete, and user deletes associated PVC. Volume deletion will fail with the message: file was not found 


**Which issue this PR fixes** *
Fixes: #40560

**Special notes for your reviewer**:
Tested fix with custom image: divyen/hyperkube-fix-deletevolume:latest (Image built using base v1.5.3-beta.0)
@kerneltime @BaluDontu  please review this fix.
2017-01-29 22:32:34 -08:00
Kubernetes Submit Queue f1cd8508e5 Merge pull request #40596 from liggitt/auth-owners
Automatic merge from submit-queue

Update authn/authz owners and reviewers

Add myself as potential reviewer to several authn/authz-related packages.

Add @deads2k as approver to several packages he wrote.
2017-01-29 20:57:05 -08:00
Kubernetes Submit Queue dd34f325bd Merge pull request #40598 from liggitt/serviceaccount-owners
Automatic merge from submit-queue

Add OWNERS file for pkg/serviceaccount
2017-01-29 20:56:53 -08:00
Kubernetes Submit Queue 9de944b58e Merge pull request #40506 from brendandburns/i18n6
Automatic merge from submit-queue

Extract strings for the 'kubectl set' family of commands.
2017-01-29 20:56:44 -08:00
Kubernetes Submit Queue 66bea1f86c Merge pull request #40532 from MHBauer/log-typo
Automatic merge from submit-queue

fix typo in logging statement

**What this PR does / why we need it**:
Typo fix in logs. I am writing an apiserver for service-catalog, and this annoys me when I see it in my logs.

**Special notes for your reviewer**:
Doc/text change only. No functional change. Feel free to combine with some existing PR.

**Release note**:

```release-note
NONE
```
2017-01-29 18:36:30 -08:00
Brendan Burns eecfcfb376 Extract strings for the 'kubectl set' family of commands. 2017-01-29 14:46:07 -08:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 88d9829ad5 pkg/kubelet/rkt: adapt to new appc/spec 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski 6b6b6c747e pkg/api/testing: split fuzzer between apimachinery and kube 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski a12c661773 pkg/util: move trace.go to k8s.io/apiserver/pkg/util/trace 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski b500b744ce pkg/genericapiserver: re-add generic feature gates 2017-01-29 19:31:43 +01:00
Kubernetes Submit Queue a3f8ee6578 Merge pull request #39135 from xingzhou/kube-39110
Automatic merge from submit-queue

Improve error messages for ValidateObject method.

Improved error messages for #ValidateObject method
in pkg/api/validation/schema.go.

Fixed #39110
2017-01-29 06:02:35 -08:00
Kubernetes Submit Queue 4bba610565 Merge pull request #40605 from deads2k/generic-32-movehttpstream
Automatic merge from submit-queue

pkg/util: move httpstream to k8s.io/apimachinery

pick one commit from @sttts's pull https://github.com/kubernetes/kubernetes/pull/40426

This blocks some client-go splitting, so I'm picking it out and merging it separately.  It's not my commit, so its not a self-lgtm in that sense.

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-29 05:15:22 -08:00
Kubernetes Submit Queue 93bd7005e6 Merge pull request #40348 from brendandburns/i18n4
Automatic merge from submit-queue

Extract strings for the config family of commands.

@fabianofranz @kubernetes/sig-cli-pr-reviews
2017-01-29 04:23:28 -08:00
Fabiano Franz 5eeef81edf Fix sorting printer with missing fields 2017-01-28 19:56:53 -02:00
Kubernetes Submit Queue 38540f17bb Merge pull request #40585 from cblecker/kube-proxy-mode-annotation-remove
Automatic merge from submit-queue

Remove proxy-mode annotation from kube-proxy

**What this PR does / why we need it**:
This removes the net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40582 

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove outdated net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.
```
2017-01-28 11:53:53 -08:00
Christoph Blecker a9dfd254c7
Remove proxy-mode annotation from kube-proxy
This removes the net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.
2017-01-28 09:12:28 -08:00
Kubernetes Submit Queue 597e938e3a Merge pull request #40621 from timothysc/daemonset_dos
Automatic merge from submit-queue

Decrease Daemonset burst replicas due to DoS conditions.

**What this PR does / why we need it**:
We are seeing DoS conditions on our Registry if were running a large cluster with too many daemonsets bursting at once.  

**Special notes for your reviewer**:
I decided not to plumb through yet another variable to the command line.  Ideally such parameters could be tweaked via a configuration file.  

**Release note**:

```release-note
NONE
```
2017-01-28 06:46:36 -08:00
Kubernetes Submit Queue e7950e6f49 Merge pull request #39977 from justinsb/aws_fix_infof
Automatic merge from submit-queue

AWS: Fix a few log messages Info -> Infof

Get those `%q`-s out of my logs :-)

```release-note
NONE
```
2017-01-27 21:03:27 -08:00
Brendan Burns 25ba561702 Extract strings for translation for the kubectl config family. 2017-01-27 20:31:49 -08:00
Kubernetes Submit Queue 63fed78005 Merge pull request #40601 from liggitt/bindata
Automatic merge from submit-queue (batch tested with PRs 40132, 39302, 40194, 40619, 40601)

Update translation bindata

Make on master leaves these changes in bindata.go
2017-01-27 18:32:27 -08:00
Kubernetes Submit Queue a951727a18 Merge pull request #40597 from wojtek-t/cleanup_get_from_cache
Automatic merge from submit-queue (batch tested with PRs 40497, 39769, 40554, 40569, 40597)

Minor cleanup in getting from apiserver cache in kubelet
2017-01-27 17:38:28 -08:00
Kubernetes Submit Queue c776d0978b Merge pull request #39769 from danwinship/networkpolicy-validation
Automatic merge from submit-queue (batch tested with PRs 40497, 39769, 40554, 40569, 40597)

NetworkPolicy validation improvements

I noticed while implementing NetworkPolicy that I we weren't validating the "Ports" field at all.

The docs are actually completely silent about what a string-valued Port field is supposed to mean. I had guessed it meant to call `net.LookupPort()` on it (ie, map it from /etc/services) but in every other case where we have an IntOrString-valued Port field in an API struct, it refers to a named ContainerPort. But that would be extremely awkward to implement in this case; a policy specifying a named port could end up mapping to a different numeric port on every container in the namespace... Do other people actually implement string-valued ports that way? Or, for that matter, implement string-valued ports at all? (Related: I hadn't noticed until now that you can leave the Port value unspecified, allowing you to say "allow to all UDP ports, but no TCP ports" or "allow to all TCP ports, but no UDP ports". That seems like something that ended up in the spec just because it was possible, not because it was actually useful...)

@kubernetes/sig-network-misc
2017-01-27 17:38:25 -08:00
Yu-Ju Hong c436671cca kuberuntime: remove the kubernetesManagedLabel label
The CRI shim should be responsible for returning only those
containers/sandboxes created through CRI. Remove this label in kubelet.
2017-01-27 17:08:46 -08:00
Janet Kuo a155111acd Print resource name when patch is done 2017-01-27 14:58:52 -08:00
Kubernetes Submit Queue 62c802203b Merge pull request #40330 from janetkuo/kill-failed-daemon-pods
Automatic merge from submit-queue

DaemonSet controller actively kills failed pods (to recreate them)

Ref #36482, @erictune @yujuhong @mikedanese @kargakis @lukaszo @piosz @kubernetes/sig-apps-bugs 

This also helps with DaemonSet update

```release-note
```
2017-01-27 13:47:09 -08:00
Kubernetes Submit Queue 6ec312a9d3 Merge pull request #40548 from deads2k/generic-31-storage-api
Automatic merge from submit-queue (batch tested with PRs 40600, 40548)

remove storage dependency on api

@sttts fyi
2017-01-27 12:57:17 -08:00
Kubernetes Submit Queue e24a326757 Merge pull request #40600 from liggitt/cascading-delete-test
Automatic merge from submit-queue (batch tested with PRs 40600, 40548)

Test cascading delete without client-side reaper does not GET
2017-01-27 12:57:15 -08:00
Yu-Ju Hong 4506f4c2d0 securitycontext: move docker-specific logic into kubelet/dockertools
This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-01-27 12:25:46 -08:00
Dr. Stefan Schimanski 674d78b2ab pkg/util: move httpstream to k8s.io/apimachinery 2017-01-27 15:10:42 -05:00
Timothy St. Clair 52bedaf416 Decrease Daemonset burst replicas due to DoS conditions. 2017-01-27 13:34:11 -06:00
deads2k 9fb37f3bba remove storage dependency on api 2017-01-27 14:02:28 -05:00
Kubernetes Submit Queue 760a51f03a Merge pull request #39469 from kevin-wangzefeng/forgiveness-API-changes
Automatic merge from submit-queue (batch tested with PRs 39469, 40557)

Forgiveness api changes

**What this PR does / why we need it**:
Splited from #34825 , contains api changes that are needed to implement forgiveness:
1. update toleration api types to support forgiveness, added a new field forgivenessSeconds to indicate the duration of time it tolerates a taint.
2. update taint api types, added a new field to indicate the time the taint is added.

**Which issue this PR fixes** : 
Related issue: #1574
Related PR: #34825 

**Special notes for your reviewer**:

**Release note**:

```release-note
forgiveness alpha version api definition
```
2017-01-27 10:38:31 -08:00
juanvallejo 5ec2a4c3ca only output "No resources found." for human readable printers 2017-01-27 13:30:23 -05:00
Kubernetes Submit Queue 312c44da2e Merge pull request #40542 from deads2k/generic-29-simple
Automatic merge from submit-queue

move packages to apimachinery and apiserver

more no-dep dependencies.

@sttts see commit names

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-27 09:26:35 -08:00
Jordan Liggitt 31136b6f19
Update translation bindata 2017-01-27 09:56:52 -05:00
Wojciech Tyczynski f81e9fd000 Merge pull request #40592 from kubernetes/revert-40239-disk_pod_lifecycle
Revert "Delay deletion of pod from the API server until volumes are deleted"
2017-01-27 15:54:18 +01:00
Wojciech Tyczynski 2d0fe16463 Minor cleanup in getting from apiserver cache in kubelet 2017-01-27 15:36:37 +01:00
Jordan Liggitt 9013e8a7cf
Test cascading delete without client-side reaper does not GET 2017-01-27 09:18:48 -05:00
Jordan Liggitt 3590928fa9
Add OWNERS file for pkg/serviceaccount 2017-01-27 09:11:04 -05:00
Jordan Liggitt 07f14ebc6f
Update authn/authz owners and reviewers 2017-01-27 08:55:44 -05:00
deads2k aea12038b4 move storage/storagebackend to apiserver 2017-01-27 08:49:55 -05:00
deads2k 9775269fb9 move genericapiserver/server/filters to apiserver 2017-01-27 08:49:30 -05:00
deads2k c6fd6941a1 move pkg/api/validation/path to apimachinery 2017-01-27 08:49:29 -05:00
Kubernetes Submit Queue 4447290096 Merge pull request #40389 from smarterclayton/use_meta
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

Use metav1.*Options in genericapiserver

Treat DeleteOptions as unversioned in metainternalversion for decoding
of bodies from older clients. Use the metav1 Options structs from
generic api server and the appropriate codec.

Completes the move to using generic server side code for API objects

@sttts
2017-01-27 05:41:49 -08:00
Kubernetes Submit Queue 1625150de8 Merge pull request #40260 from liggitt/kubectl-tpr
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

make kubectl generic commands work with unstructured objects

part of making apply, edit, label, annotate, and patch work with third party resources

fixes #35149
fixes #34413

prereq of:
https://github.com/kubernetes/kubernetes/issues/35496
https://github.com/kubernetes/kubernetes/pull/40096

related to:
https://github.com/kubernetes/kubernetes/issues/39906
https://github.com/kubernetes/kubernetes/issues/40119

kubectl is currently decoding any resource it doesn't have compiled-in to a ThirdPartyResourceData struct, which means it computes patches using that struct, and would try to send a ThirdPartyResourceData object to the API server when running `apply`

This PR removes the behavior that decodes unknown objects into ThirdPartyResourceData structs internally, and fixes up the following generic commands to work with unstructured objects

- [x] apply
  - [x] decode into runtime.Unstructured objects
  - [x] successfully use `--record` with unregistered objects 
- [x] patch
  - [x] decode into runtime.Unstructured objects
  - [x] successfully use `--record` with unregistered objects 
- [x] describe
  - [x] decode into runtime.Unstructured objects
  - [x] implement generic describer
- [x] fix other generic kubectl commands to work with unstructured objects
  - [x] label
  - [x] annotate

follow-ups for pre-existing issues:
- [ ] `explain` doesn't work with unregistered resources
- [ ] remove special casing of federation group in clientset lookups, etc
- [ ] `patch`
  - [ ] doesn't honor output formats when persisting to server (`kubectl patch -f svc.json --type merge -p '{}' -o json` doesn't output json)
  - [ ] --local throws exception (`kubectl patch -f svc.json --type merge -p '{}' --local`)
- [ ] `apply`
  - [ ] fall back to generic JSON patch computation if no go struct is registered for the target GVK (e.g. https://github.com/kubernetes/kubernetes/pull/40096)
  - [ ] ensure subkey deletion works in CreateThreeWayJSONMergePatch
  - [ ] ensure type stomping works in CreateThreeWayJSONMergePatch
  - [ ] lots of tests for generic json patch computation
  - [ ] prevent generic apply patch computation among different versions
  - [ ] reconcile treatment of nulls with https://github.com/kubernetes/kubernetes/pull/35496
- [ ] `edit`
  - [ ] decode into runtime.Unstructured objects
  - [ ] fall back to generic JSON patch computation if no go struct is registered for the target GVK
2017-01-27 05:41:45 -08:00
Kubernetes Submit Queue 10e3edcaa4 Merge pull request #39223 from brendandburns/i18n
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

Add a script to extract strings for translation and a sample of it's output

@fabianofranz @deads2k @kubernetes/sig-cli-pr-reviews
2017-01-27 05:41:44 -08:00
Kevin d72b32b9d2 update generated files 2017-01-27 20:55:31 +08:00
Kevin 72a19819a6 api changes of forgiveness phase1 2017-01-27 20:55:24 +08:00
Aleksandra Malinowska 74e1d8078e Revert "Delay deletion of pod from the API server until volumes are deleted" 2017-01-27 13:31:02 +01:00
Kubernetes Submit Queue e6e17a5be6 Merge pull request #40572 from yujuhong/cri_cleanup
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

docker-CRI: Remove legacy code for non-grpc integration

A minor cleanup to remove the code that is no longer in use to simplify the logic.
2017-01-27 01:34:22 -08:00
Kubernetes Submit Queue fb201dc838 Merge pull request #40564 from Random-Liu/add-container-not-found-error
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

Add IsContainerNotFound in kube_docker_client

This PR added `IsContainerNotFound` function in kube_docker_client and changed dockershim to use it.

@yujuhong @freehan
2017-01-27 01:34:21 -08:00
Kubernetes Submit Queue 88890f586c Merge pull request #40126 from resouer/return-value
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

Do not swallow error in asw.updateNodeStatusUpdateNeeded

Ref #39056

Bubble the error up to `SetNodeUpdateStatusNeeded` and log it out.

NOTE: This does not modify interface of `SetNodeUpdateStatusNeeded`
2017-01-27 01:34:16 -08:00
Clayton Coleman a591242061
Use metav1.*Options in genericapiserver
Treat DeleteOptions as unversioned in metainternalversion for decoding
of bodies from older clients. Use the metav1 Options structs from
generic api server and the appropriate codec.
2017-01-27 01:25:29 -05:00
Madhusudan.C.S 4f969bdfc2 Add helpers for creating an RBAC RoleBinding. 2017-01-26 20:29:07 -08:00
Kubernetes Submit Queue 1b8ae3a76a Merge pull request #40543 from deads2k/generic-30-feature
Automatic merge from submit-queue (batch tested with PRs 40543, 39999)

remove pkg/feature dependency from genericapiserver.

@sttts I think you just forgot this when you were snipping the rest of the link.  If I understood the previous pull correctly, this ought to ensure proper registration of the bits we need, right?
2017-01-26 18:07:27 -08:00
Yu-Ju Hong 202488995a docker-CRI: Remove legacy code for non-grpc integration 2017-01-26 17:23:20 -08:00
Jordan Liggitt 408a978f26
fix --record to work with unstructured objects 2017-01-26 19:59:27 -05:00
Jordan Liggitt c317f92990
patch: allow --local to use structs for strategic merge, warn about unknown objects 2017-01-26 19:59:26 -05:00
Jordan Liggitt 424dac921f
Fall back to unstructured typer retrieving GVKs for printing 2017-01-26 19:59:26 -05:00
Jordan Liggitt aaf96a1048
apply: use unstructured objects 2017-01-26 19:59:26 -05:00
Jordan Liggitt d41e391799
describe: allow describing generic api objects 2017-01-26 19:59:26 -05:00
Jordan Liggitt 06c12f6716
describe: use unstructured objects 2017-01-26 19:59:25 -05:00
Jordan Liggitt b6d4f371cd
patch: use unstructured objects 2017-01-26 19:59:25 -05:00
Jordan Liggitt 89266588d1
label: use unstructured objects 2017-01-26 19:59:25 -05:00
Jordan Liggitt 9b60d7fd84
annotate: use unstructured objects 2017-01-26 19:59:24 -05:00
Jordan Liggitt dd6d454848
kubectl: remove ThirdPartyResourceData behavior for unregistered objects 2017-01-26 19:59:24 -05:00
Jordan Liggitt a82c4481f3
Distinguish between client and unstructuredclient in fake factory 2017-01-26 19:59:16 -05:00
Jordan Liggitt a57307a429
bazel 2017-01-26 19:59:16 -05:00