Commit Graph

18542 Commits (bb29efb0c36ad047a560cb8d1593354b021279a1)

Author SHA1 Message Date
Kubernetes Submit Queue 88257cfb19 Merge pull request #39797 from fraenkel/portforward_ws_api
Automatic merge from submit-queue

Port forward over websockets API

The API changes for port forwarding over websockets
2017-01-20 15:05:33 -08:00
Kubernetes Submit Queue 66c59e491e Merge pull request #40240 from ncdc/shared-informers-01
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

Expose ForResource in generated informer factory, copy lister expansions

Expose ForResource in generated informer factory

Copy lister expansions from pkg/client/cache into pkg/client/listers

@deads2k
2017-01-20 14:22:53 -08:00
Kubernetes Submit Queue e4804a6164 Merge pull request #40237 from derekwaynecarr/remove_pet
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

Fixup pet terminology in log and user-facing events

**What this PR does / why we need it**:
Removes some user-facing strings for pet terminology.
2017-01-20 14:22:52 -08:00
Kubernetes Submit Queue 470e732d7f Merge pull request #40235 from deads2k/generic-26-listers
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

move listers out of cache to reduce import tree

Moving the listers from `pkg/client/cache` snips links to all the different API groups from `pkg/storage`, but the dreaded `ListOptions` remains.

@sttts
2017-01-20 14:22:51 -08:00
Kubernetes Submit Queue ffb2dc2e02 Merge pull request #40187 from tianshapjq/adjust-delete-pod-uid-helpinfo
Automatic merge from submit-queue (batch tested with PRs 40187, 40231, 40152)

remove the delete-pod-uid spec

**What this PR does / why we need it**:
remove the specifications about "kubectl delete pod uid" cause it's no longer supported.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40121
2017-01-20 13:29:45 -08:00
Mike Danese e1491aa788 add csr to kubectl get help 2017-01-20 13:14:51 -08:00
Kubernetes Submit Queue 85d328f8da Merge pull request #40189 from xilabao/patch-5
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

update short help message in set resource

To keep the help message well-formed.
```
#kubectl set -h           
Configure application resources 

These commands help you make changes to existing application resources.

Available Commands:
  image       Update image of a pod template
  resources   update resource requests/limits on objects with pod templates
  selector    Set the selector on a resource

Usage:
  kubectl set SUBCOMMAND [options]
```

```release-note
NONE
```
2017-01-20 12:34:59 -08:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
Kubernetes Submit Queue 63eb043d74 Merge pull request #40146 from deads2k/api-61-announce
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

move apimachinery/announced to apimachinery

This also rewires the announce package to allow installation into multiple groups via multiple calls to `install.Install`.  At some point, we'll want to unwire the hardcoded, "install to this scheme" call.

@lavalamp something we've wanted for a while and need for genericapiserver
@seh you've asked related questions
@sttts ptal.  First commit is interesting, second commit is a straight move.
2017-01-20 12:34:54 -08:00
Kubernetes Submit Queue dcf14add92 Merge pull request #37228 from sjenning/teardown-terminated-volumes
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

kubelet: storage: teardown terminated pod volumes

This is a continuation of the work done in https://github.com/kubernetes/kubernetes/pull/36779

There really is no reason to keep volumes for terminated pods attached on the node.  This PR extends the removal of volumes on the node from memory-backed (the current policy) to all volumes.

@pmorie raised a concern an impact debugging volume related issues if terminated pod volumes are removed.  To address this issue, the PR adds a `--keep-terminated-pod-volumes` flag the kubelet and sets it for `hack/local-up-cluster.sh`.

For consideration in 1.6.

Fixes #35406

@derekwaynecarr @vishh @dashpole

```release-note
kubelet tears down pod volumes on pod termination rather than pod deletion
```
2017-01-20 12:34:52 -08:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
Derek Carr 8ad16dfcab Fixup pet terminology in log and user-facing events 2017-01-20 14:47:11 -05:00
Kubernetes Submit Queue 54ff406702 Merge pull request #40159 from euank/beware-of-shadows
Automatic merge from submit-queue (batch tested with PRs 40011, 40159)

dockertools/nsenterexec: fix err shadow

The shadow of err meant the combination of `exec-handler=nsenter` +
`tty` + a non-zero exit code meant that the exit code would be LOST
FOREVER 👻

This isn't all that important since no one really used the nsenter exec
handler as I understand it

```release-note
NONE
```
2017-01-20 10:48:45 -08:00
Ivan Shvedunov 7a4ecc5c58 Fix bad time values in kubelet FakeRuntimeService
These values don't affect tests but they can be confusing
for developers looking at the code for reference.
2017-01-20 20:44:04 +03:00
Andy Goldstein e5dd576b31 Copy lister expansions
Copy lister expansions from pkg/client/cache into pkg/client/listers
2017-01-20 12:41:37 -05:00
Andy Goldstein 307acab3f3 Expose ForResource in generated informer factory 2017-01-20 12:41:37 -05:00
deads2k 9d3dfbf630 move apimachinery/announced to apimachinery 2017-01-20 12:20:13 -05:00
deads2k dfd8db8ae9 allow API groups to be installed and registered in multiple schemes 2017-01-20 12:19:49 -05:00
Kubernetes Submit Queue 22a405055d Merge pull request #40170 from deads2k/client-10-restclient
Automatic merge from submit-queue (batch tested with PRs 36693, 40154, 40170, 39033)

make client-go authoritative for pkg/client/restclient

Moves client/restclient to client-go and a util/certs, util/testing as transitives.
2017-01-20 09:18:52 -08:00
Seth Jennings e2750a305a reclaim terminated pod volumes 2017-01-20 11:08:35 -06:00
shiywang 6f5b8af725 fix validation errors in cli are cryptic
typo
2017-01-21 00:44:48 +08:00
Kubernetes Submit Queue 53b43d6f8f Merge pull request #40190 from yujuhong/nsenter_exec
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

dockershim: add support for the 'nsenter' exec handler

This change simply plumbs the kubelet configuration
(--docker-exec-handler) to DockerService.

This fixes #35747.
2017-01-20 08:28:53 -08:00
Kubernetes Submit Queue 0e1a166c4d Merge pull request #39158 from feiskyer/cri-proto3
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

CRI: upgrade protobuf to v3

For #38854, this PR upgrades CRI protobuf version to v3, and also updated related packages for confirming to new api.  

**Release note**:

```
CRI: upgrade protobuf version to v3.
```
2017-01-20 08:28:49 -08:00
Kubernetes Submit Queue 9841162445 Merge pull request #40165 from Random-Liu/fix-kubelet-owner-file
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

Small fix in kubelet owner file.

/cc @apelisse @dchen1107 @timstclair
2017-01-20 08:28:47 -08:00
Michael Fraenkel 08d0c86629 Generated code 2017-01-20 10:06:24 -06:00
Michael Fraenkel eb5d59467e Portforward API 2017-01-20 09:48:05 -06:00
deads2k 9c6a522882 mechanical results of client auth plugin 2017-01-20 08:05:18 -05:00
deads2k 2f51cc4ce4 move client auth plugins 2017-01-20 08:04:53 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
deads2k 32a2c2d05c remove old restclient 2017-01-20 07:56:35 -05:00
Mike Bryant a507777de8 Change logging function to formatting version 2017-01-20 11:24:05 +00:00
Euan Kemp d55776e85a dockertools/nsenterexec: fix err shadow
The shadow of err meant the combination of `exec-handler=nsenter` +
`tty` + a non-zero exit code meant that the exit code would be LOST
FOREVER 👻

This isn't all that important since no one really used the nsenter exec
handler as I understand it
2017-01-20 01:19:18 -08:00
foxyriver cbb8f903e1 declare it, but no use it 2017-01-20 15:14:52 +08:00
Kubernetes Submit Queue 71802d2dc1 Merge pull request #40023 from soltysh/completions_boilerplate
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853)

Allow setting copyright header file for generated completions

This PR allows downstream vendors (like openshift) to generate completions with custom header, similarly to other generated code.

@fabianofranz ptal
@kubernetes/sig-cli-misc fyi
2017-01-19 18:53:47 -08:00
Kubernetes Submit Queue 2d4d2f913f Merge pull request #39446 from fraenkel/env_secrets
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853)

Create environment variables from secrets

Allow environment variables to be populated from entire secrets.

**Release note**:
```release-note
Populate environment variables from a secrets.
```
2017-01-19 18:53:45 -08:00
Kubernetes Submit Queue 4e3488ee99 Merge pull request #39831 from jessfraz/fix-38774
Automatic merge from submit-queue (batch tested with PRs 39772, 39831, 39481, 40167, 40149)

Check if error is Status in result.Stream()

Fix #38774

This adds the same functionality to `.Stream()` that was added to `.Error()`, `.Into()`, and `.Get()` in ce187f9c6a to try decoding the body as a Status.

This broke `.Stream()` because the decoding of the body as `Status` was removed from `transformResponse` in ce187f9c6a (diff-de85e3effc36b7bbe3fb9eae6c833cf3L933)
2017-01-19 17:56:45 -08:00
Pengfei Ni 53c20e3630 kubelet/kuberuntime: update cri to protobuf v3 2017-01-20 09:55:56 +08:00
Pengfei Ni d4bfcd1fda kubelet/dockershim: update cri to protobuf v3 2017-01-20 09:55:37 +08:00
Pengfei Ni e77e61b3bb kubelet/rktshim: update cri to protobuf v3 2017-01-20 09:55:19 +08:00
Pengfei Ni 76afc7300d kubelet/remote: update cri to protobuf v3 2017-01-20 09:55:07 +08:00
Pengfei Ni 8e4ea2dd15 kubelet/server: update cri to protobuf v3 2017-01-20 09:54:49 +08:00
Pengfei Ni 97fff6a7cf kubelet/api: update cri to protobuf v3 2017-01-20 09:54:28 +08:00
Pengfei Ni 9cab3b4a07 CRI: update protobuf to v3 2017-01-20 09:54:03 +08:00
Kubernetes Submit Queue 51919b4e1e Merge pull request #39772 from mikedanese/v1beta1
Automatic merge from submit-queue

promote certificates api to beta

Mostly posting to see what breaks but also this API is ready to be promoted.

```release-note
Promote certificates.k8s.io to beta and enable it by default. Users using the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading.
```

@kubernetes/api-approvers @jcbsmpsn @pipejakob
2017-01-19 17:48:16 -08:00
Kubernetes Submit Queue 0610a23986 Merge pull request #40164 from apelisse/update-root-approvers-files
Automatic merge from submit-queue

Update root approvers files

Replaces #40040 

Update top level OWNERS files mostly to set assignees to approvers. Also remove @bgrant0607 from everywhere but the very top level OWNERS file.
2017-01-19 17:02:18 -08:00
Kubernetes Submit Queue f83802b317 Merge pull request #36984 from wojtek-t/secret_manager
Automatic merge from submit-queue

Create SecretManager interface and switch to caching secrets in kubelet

Ref #19188

Obviously we would need to extend the interface to solve #19188 but this is good first step anyway.
2017-01-19 17:02:08 -08:00
xilabao 5b3d59c235 update short help message in set resource 2017-01-19 18:53:43 -06:00
Klaus Ma 92f3ffb741 Avoid keyword as var name. 2017-01-20 08:48:09 +08:00
Yu-Ju Hong f9479ed84b dockershim: add support for the 'nsenter' exec handler
This change simply plumbs the kubelet configuration
(--docker-exec-handler) to DockerService.
2017-01-19 16:23:48 -08:00
tianshapjq 69946cf886 remove the delete-pod-uid spec 2017-01-20 08:16:20 +08:00
Mike Danese 44b7246568 autogenerated 2017-01-19 14:24:45 -08:00
Mike Danese 96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
Garrett Rodrigues ad1e5e98c2 Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
gmarek 3c0d2bb1f0 Add SecretManager to Kubelet 2017-01-19 20:12:04 +01:00
Michael Fraenkel 5048c01861 Generated code 2017-01-19 14:07:10 -05:00
Kubernetes Submit Queue 80f3e93b9a Merge pull request #40129 from calebamiles/calebamiles-fix-cloudprovider-owners
Automatic merge from submit-queue

Prune reviewers from pkg/cloudprovider

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

Per discussion in https://github.com/kubernetes/kubernetes/pull/36530 the `OWNERS` file for `pkg/cloudprovider` should not contain additional reviewers at this time.

**Special notes for your reviewer**:

Sorry for the extra work in review

**Release note**:

`NONE`
2017-01-19 11:06:55 -08:00
Random-Liu 1027b14e3e Small fix in kubelet owner file. 2017-01-19 11:04:57 -08:00
Wojciech Tyczynski 09e4de385c Enable nontrivial secret manager 2017-01-19 19:47:33 +01:00
Wojciech Tyczynski ffd8daf488 SecretManager with caching 2017-01-19 19:47:32 +01:00
Wojciech Tyczynski 85ee9e570b Create SecretManager interface 2017-01-19 19:47:32 +01:00
Michael Fraenkel 13d693d220 Secrets can populate environment variables 2017-01-19 13:46:05 -05:00
Kubernetes Submit Queue 6e268e6f83 Merge pull request #40144 from wojtek-t/unstructured_benchmark
Automatic merge from submit-queue (batch tested with PRs 40150, 40144)

Unstructured benchmark

Ref #39017
2017-01-19 10:17:09 -08:00
Kubernetes Submit Queue e9d4e4341c Merge pull request #40087 from deads2k/generic-24-move-fields
Automatic merge from submit-queue

move pkg/fields to apimachinery

Purely mechanical move of `pkg/fields` to apimachinery.  

Discussed with @lavalamp on slack.  Moving this an `labels` to apimachinery.

@liggitt any concerns?  I think the idea of field selection should become generic and this ends up shared between client and server, so this is a more logical location.
2017-01-19 08:48:17 -08:00
Kubernetes Submit Queue 05c2a0825e Merge pull request #38871 from k82cn/k8s_25318
Automatic merge from submit-queue

Made multi-scheduler graduated to Beta and then v1.

fixes #25318
2017-01-19 07:58:51 -08:00
Maciej Szulik 56147c5174 Allow setting copyright header file for generated completions 2017-01-19 16:06:20 +01:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Kubernetes Submit Queue ac857a5ade Merge pull request #40106 from deads2k/client-09-switch
Automatic merge from submit-queue

make client-go more authoritative

Builds on https://github.com/kubernetes/kubernetes/pull/40103

This moves a few more support package to client-go for origination.  
 1. restclient/watch - nodep
 1. util/flowcontrol - used interface
 1. util/integer, util/clock - used in controllers and in support of util/flowcontrol
2017-01-19 06:34:49 -08:00
Kubernetes Submit Queue b76b710a06 Merge pull request #40003 from sttts/sttts-apiserver-pkg-api
Automatic merge from submit-queue (batch tested with PRs 40003, 40017)

k8s.io/apiserver and genericapiserver: move packages around

Towards more sane k8s.io/apiserver package structure:

```
rename pkg/genericapiserver/{ => server}
 rename pkg/genericapiserver/{ => server}/filters
 rename pkg/genericapiserver/{ => server}/mux
 rename pkg/genericapiserver/{ => server}/openapi
 rename pkg/genericapiserver/{ => server}/options
 rename pkg/genericapiserver/{ => server}/routes
 rename pkg/genericapiserver/{ => server}/routes/data
 rename pkg/genericapiserver/{ => server}/routes/data/swagger
 rename pkg/genericapiserver/{api => endpoints}
 rename pkg/genericapiserver/{api => endpoints}/filters
 rename pkg/genericapiserver/{api => endpoints}/handlers
 rename pkg/genericapiserver/{api => endpoints}/handlers/responsewriters
 rename pkg/genericapiserver/{api => endpoints}/openapi
 rename pkg/genericapiserver/{api => endpoints}/testing
 rename pkg/genericapiserver/{api => registry}/rest
 rename pkg/genericapiserver/{api => registry}/rest/resttest
 rename pkg/{ => genericapiserver}/registry/generic
 rename pkg/{ => genericapiserver}/registry/generic/registry
 rename pkg/{ => genericapiserver}/registry/generic/rest
 rename staging/src/k8s.io/apiserver/pkg/{ => endpoints}/handlers/negotiation
 rename staging/src/k8s.io/apiserver/pkg/{ => endpoints}/metrics
 rename staging/src/k8s.io/apiserver/pkg/{ => endpoints}/request
 rename staging/src/k8s.io/apiserver/pkg/{ => server}/healthz
 rename staging/src/k8s.io/apiserver/pkg/{ => server}/httplog
 rename staging/src/k8s.io/apiserver/pkg/{ => util}/webhook
```
2017-01-19 05:54:07 -08:00
Cole Mickens 1c72f2b9de azure: acr fix login server 2017-01-19 05:08:16 -08:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Wojciech Tyczynski 91f8dcf44a Test runtime.Object <-> map[string]interface{} conversion 2017-01-19 13:54:38 +01:00
deads2k 6c6616b41c move restclient/watch 2017-01-19 07:39:20 -05:00
deads2k cdb2934bbc remove kubernetes copy of clientcmd types 2017-01-19 07:39:19 -05:00
Kubernetes Submit Queue c40a668ae4 Merge pull request #40081 from kargakis/cleanup-policy-fix
Automatic merge from submit-queue

controller: decouple cleanup policy from deployment strategies

Deployments get cleaned up only when they are paused, they get scaled up/down,
or when the strategy that drives rollouts completes. This means that stuck
deployments that fall into none of the above categories will not get cleaned
up. Since cleanup is already safe by itself (we only delete old replica sets
that are synced by the replica set controller and have no replicas) we can
execute it for every deployment when there is no intention to rollback.

Fixes https://github.com/kubernetes/kubernetes/issues/40068
2017-01-19 04:35:39 -08:00
Klaus Ma 604957c11c Added generated codes. 2017-01-19 20:20:08 +08:00
Klaus Ma c8c4b81963 Made multi-scheduler graduated to Beta and then v1. 2017-01-19 20:16:01 +08:00
Dr. Stefan Schimanski 88cc794c8d genericapiserver: get rid of pkg/genericapiserver/server/openapi/common 2017-01-19 13:06:47 +01:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Dr. Stefan Schimanski e3b6235dee genericapiserver: move packages
Towards a sane k8s.io/apiserver package structure.
2017-01-19 13:06:46 +01:00
Kubernetes Submit Queue f8ed5c36aa Merge pull request #40080 from soltysh/fix_resttest
Automatic merge from submit-queue

Fix resttest Update action when AllowUnconditionalUpdate is false

Currently our storage Update test assumes that AllowUncoditionalUpdate returns true, and in testUpdateRejectsMismatchedNamespace updates the same object it's passing to create. This results in errors when trying to update that object, due to resourceVersion not being set to a proper value. This patch modifes this so that the update is executed on a stored object, which will have correct values set.

@deads2k ptal
@kubernetes/sig-api-machinery-misc fyi
2017-01-19 03:46:43 -08:00
Maciej Kwiek 2e19dea9ec Remove conversion package 2017-01-19 10:42:35 +01:00
Kubernetes Submit Queue 0144fae64f Merge pull request #29666 from vefimova/fix_29270
Automatic merge from submit-queue

Fixed merging of host's and dns' search lines

Fixed forming of pod's Search line in resolv.conf:
 - exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming

Fixes #29270

**Release note**:

```release-note
Fixed forming resolver search line for pods: exclude duplicates, obey libc limitations, logging and eventing appropriately.
```
2017-01-19 01:37:50 -08:00
Michail Kargakis d5227e364d controller: decouple cleanup policy from deployment strategies
Deployments get cleaned up only when they are paused, they get scaled up/down,
or when the strategy that drives rollouts completes. This means that stuck
deployments that fall into none of the above categories will not get cleaned
up. Since cleanup is already safe by itself (we only delete old replica sets
that are synced by the replica set controller and have no replicas) we can
execute it for every deployment when there is no intention to rollback.
2017-01-19 10:33:24 +01:00
Kubernetes Submit Queue 723fa08767 Merge pull request #39324 from wojtek-t/change_patch_api
Automatic merge from submit-queue

Prepare for using optimized conversion to/from map[string]interface{} in Patch operation

Ref #39017
2017-01-19 00:50:12 -08:00
caleb miles 74525c2f50 Remove pkg/cloudprovider/providers/OWNERS
Wait until later to decide how to expand the reviewers for `pkg/cloudprovider/*`
2017-01-19 00:44:20 -08:00
caleb miles 81eb2bcd9e Prune reviewers from pkg/cloudprovider
Per discussion in https://github.com/kubernetes/kubernetes/pull/36530 the `OWNERS` file for `pkg/cloudprovider` should not contain additional reviewers at this time.
2017-01-19 00:41:28 -08:00
Kubernetes Submit Queue f90bb1772b Merge pull request #39846 from andrewrynhard/add_authorization_mode
Automatic merge from submit-queue

Add authorization mode to kubeadm

This PR adds an option in `kubeadm` to allow a user to specify an [authorization plugin](https://kubernetes.io/docs/admin/authorization/). It defaults to RBAC.
2017-01-18 22:49:58 -08:00
Kubernetes Submit Queue 60489f837b Merge pull request #36530 from apelisse/owners-pkg-cloudprovider
Automatic merge from submit-queue

Curating Owners: pkg/cloudprovider

cc @runseb @justinsb @kerneltime @mikedanese @svanharmelen @anguslees @brendandburns @abrarshivani @imkin @luomiao @colemickens @ngtuna @dagnello @abithap

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-18 18:40:53 -08:00
Andrew Rynhard f46bf42ba0 Add authorization mode to kubeadm 2017-01-18 14:02:53 -08:00
Kubernetes Submit Queue 4520819df7 Merge pull request #39042 from juanvallejo/jvallejo/dont-filter-pods-if-json-or-yaml
Automatic merge from submit-queue (batch tested with PRs 36467, 36528, 39568, 40094, 39042)

do not filter kubectl get pods if -o json or yaml

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

This patch sets the value of --show-all to true if the output format
specified is 'json' or 'yaml'.

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

@smarterclayton
2017-01-18 13:37:13 -08:00
Kubernetes Submit Queue 5ca25bea21 Merge pull request #36528 from apelisse/owners-pkg-kubelet
Automatic merge from submit-queue

Curating Owners: pkg/kubelet

cc @euank @vishh @dchen1107 @feiskyer @yujuhong @yifan-gu @derekwaynecarr @saad-ali

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-18 13:14:25 -08:00
peay 6b5c8f1d2f Emit warning when CronJob cannot determine starting time 2017-01-18 15:33:32 -05:00
Jess Frazelle 502a34e8dc
Check if error is Status in result.Stream()
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-18 11:59:27 -08:00
Kubernetes Submit Queue eee819039d Merge pull request #39851 from liggitt/taint-versioned
Automatic merge from submit-queue

Use versioned Taint/Toleration/AvoidPods objects when marshalling

fixes #39847

`kubectl taint`, the kubelet's `--register-with-taints` option, and several Taint/Toleration/AllowPod annotation helpers were marshaling/unmarshaling using internal structs
2017-01-18 11:30:36 -08:00
Antoine Pelisse 3d82265340 Update OWNERS approvers and reviewers: pkg/kubelet 2017-01-18 10:27:11 -08:00
juanvallejo 713df3d74e
remove check for multiple resource types 2017-01-18 13:26:13 -05:00
Kubernetes Submit Queue e1fa1512e4 Merge pull request #39842 from gnufied/fix-aws-2x-calls
Automatic merge from submit-queue (batch tested with PRs 39625, 39842)

AWS: Remove duplicate calls to DescribeInstance during volume operations

This change removes all duplicate calls to describeInstance
from aws volume code path.

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

This PR removes the duplicate calls present in disk check code paths in AWS. I can confirm that `getAWSInstance` actually returns all instance information already and hence there is no need of making separate `describeInstance` call.

Related to - https://github.com/kubernetes/kubernetes/issues/39526

cc @justinsb @jsafrane
2017-01-18 10:19:13 -08:00
Kubernetes Submit Queue 302d3ab1d7 Merge pull request #39625 from deads2k/rbac-36-beta
Automatic merge from submit-queue (batch tested with PRs 39625, 39842)

Add RBAC v1beta1

Add `rbac.authorization.k8s.io/v1beta1`.  This scrubs `v1alpha1` to remove cruft, then add `v1beta1`.  We'll update other bits of infrastructure to code to `v1beta1` as a separate step.

```release-note
The `attributeRestrictions` field has been removed from the PolicyRule type in the rbac.authorization.k8s.io/v1alpha1 API. The field was not used by the RBAC authorizer.
```

@kubernetes/sig-auth-misc @liggitt @erictune
2017-01-18 10:19:11 -08:00
Jordan Liggitt e49554501f
Use versioned Taint/Toleration/AllowPods objects when marshalling 2017-01-18 12:52:14 -05:00
Kubernetes Submit Queue 6dfe5c49f6 Merge pull request #38865 from vwfs/ext4_no_lazy_init
Automatic merge from submit-queue

Enable lazy initialization of ext3/ext4 filesystems

**What this PR does / why we need it**: It enables lazy inode table and journal initialization in ext3 and ext4.

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

**Release note**:
```release-note
Enable lazy inode table and journal initialization for ext3 and ext4
```

**Special notes for your reviewer**:
This PR removes the extended options to mkfs.ext3/mkfs.ext4, so that the defaults (enabled) for lazy initialization are used.

These extended options come from a script that was historically located at */usr/share/google/safe_format_and_mount* and later ported to GO so this dependency to the script could be removed. After some search, I found the original script here: https://github.com/GoogleCloudPlatform/compute-image-packages/blob/legacy/google-startup-scripts/usr/share/google/safe_format_and_mount

Checking the history of this script, I found the commit [Disable lazy init of inode table and journal.](4d7346f7f5). This one introduces the extended flags with this description:
```
Now that discard with guaranteed zeroing is supported by PD,
initializing them is really fast and prevents perf from being affected
when the filesystem is first mounted.
```

The problem is, that this is not true for all cloud providers and all disk types, e.g. Azure and AWS. I only tested with magnetic disks on Azure and AWS, so maybe it's different for SSDs on these cloud providers. The result is that this performance optimization dramatically increases the time needed to format a disk in such cases.

When mkfs.ext4 is told to not lazily initialize the inode tables and the check for guaranteed zeroing on discard fails, it falls back to a very naive implementation that simply loops and writes zeroed buffers to the disk. Performance on this highly depends on free memory and also uses up all this free memory for write caching, reducing performance of everything else in the system. 

As of https://github.com/kubernetes/kubernetes/issues/30752, there is also something inside kubelet that somehow degrades performance of all this. It's however not exactly known what it is but I'd assume it has something to do with cgroups throttling IO or memory. 

I checked the kernel code for lazy inode table initialization. The nice thing is, that the kernel also does the guaranteed zeroing on discard check. If it is guaranteed, the kernel uses discard for the lazy initialization, which should finish in a just few seconds. If it is not guaranteed, it falls back to using *bio*s, which does not require the use of the write cache. The result is, that free memory is not required and not touched, thus performance is maxed and the system does not suffer.

As the original reason for disabling lazy init was a performance optimization and the kernel already does this optimization by default (and in a much better way), I'd suggest to completely remove these flags and rely on the kernel to do it in the best way.
2017-01-18 09:09:52 -08:00
Kubernetes Submit Queue 788804142f Merge pull request #39036 from juanvallejo/jvallejo/do-not-list-deleted-pull-secrets
Automatic merge from submit-queue (batch tested with PRs 40038, 40041, 39036)

don't show deleted pull secrets - kubectl describe

This patch filters out any image pull secrets that have been deleted
when printing the describer output for a service account.

Related downstream bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1403376

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

@fabianofranz @AdoHe
2017-01-18 08:37:54 -08:00
Kubernetes Submit Queue 95cca9c558 Merge pull request #40041 from deads2k/generic-25-undo-admission
Automatic merge from submit-queue (batch tested with PRs 40038, 40041, 39036)

move admission to genericapiserver

I disconnected the initialization that was type specific for later assessment.

@sttts
2017-01-18 08:37:53 -08:00
deads2k d1fec7068f generated 2017-01-18 10:35:46 -05:00
deads2k e74efe41a0 add rbac v1beta1 2017-01-18 09:49:33 -05:00
deads2k cbf8ea2a6f remove fields not promoted to beta 2017-01-18 09:49:33 -05:00
Justin Santa Barbara 04b787b946 AWS: trust region if found from AWS metadata
Means we can run in newly announced regions without a code change.

We don't register the ECR provider in new regions, so we will still need
a code change for now.

This also means we do trust config / instance metadata, and don't reject
incorrectly configured zones.

Fix #35014
2017-01-18 09:17:55 -05:00
Maciej Szulik aec417a567 Fix resttest Update action when AllowUnconditionalUpdate is false 2017-01-18 14:27:11 +01:00
deads2k 01b3b2b461 move admission to genericapiserver 2017-01-18 08:15:19 -05:00
deads2k 52ec66ee85 remove api dependency from admission 2017-01-18 08:09:48 -05:00
Wojciech Tyczynski 39506d2219 Fix incorrect testapi groups 2017-01-18 14:02:01 +01:00
deads2k 4f915039e4 move pkg/client/transport to client-go 2017-01-18 07:56:01 -05:00
Kubernetes Submit Queue fe69dcf861 Merge pull request #40018 from sttts/sttts-genericapiserver-storage-dep
Automatic merge from submit-queue (batch tested with PRs 40008, 40005, 40018)

Fix wrong rename pkg/storage.Is{TestFail -> Conflict}
2017-01-18 04:04:49 -08:00
Wojciech Tyczynski 7ac60f2312 Prepare for using optimized conversion to map[string]interface{} in patch 2017-01-18 11:53:30 +01:00
Wojciech Tyczynski d08abdb187 Allow for returning map[string]interface{} from patch. 2017-01-18 11:53:30 +01:00
Dr. Stefan Schimanski 331d96539a genericapiserver: move pkg/auth/handlers into filters 2017-01-18 10:20:41 +01:00
Alexander Block ff38ac2689 Set custom PollingDelay of 5 seconds for Azure VirtualMachinesClient
The default polling delay of 1 minute results in very long delays when
an Azure Disk is attached to a node. It gets worse as go-autorest
doubles the default delay to 2 minutes.

Please see: https://github.com/kubernetes/kubernetes/issues/35180#issuecomment-273085063

Only the PollingDelay for VirtualMachinesClient is modified here to
avoid too much pressure on Azure quotas.
2017-01-18 09:24:28 +01:00
Kubernetes Submit Queue 8f99b74466 Merge pull request #40030 from colemickens/colemickens-dyn-disk-name-length
Automatic merge from submit-queue (batch tested with PRs 39826, 40030)

azure disk: restrict length of name

**What this PR does / why we need it**:
Fixes dynamic disk provisioning on Azure by properly truncating the disk name to conform to the Azure API spec.

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

**Special notes for your reviewer**:
n/a

**Release note**:
```release-note
azure disk: restrict name length for Azure specifications
```

cc: @rootfs
2017-01-17 21:37:02 -08:00
Kubernetes Submit Queue 180936f8df Merge pull request #39826 from shyamjvs/fake-docker-client-fix
Automatic merge from submit-queue

Made tracing of calls and container lifecycle steps in FakeDockerClient optional

Fixes #39717 

Slightly refactored the FakeDockerClient code and made tracing optional (but enabled by default).

@yujuhong @Random-Liu
2017-01-17 21:11:36 -08:00
Kubernetes Submit Queue f56b606985 Merge pull request #36520 from apelisse/owners-pkg-volume
Automatic merge from submit-queue

Curating Owners: pkg/volume

cc @jsafrane @spothanis @agonzalezro @justinsb @johscheuer @simonswine @nelcy @pmorie @quofelix @sdminonne @thockin @saad-ali @rootfs

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-17 19:56:39 -08:00
Zihong Zheng 6b9860cf54 Allows kubectl create -f to filter by selector. 2017-01-17 19:18:51 -08:00
Saad Ali 9d08c9a3d9 Update OWNERS 2017-01-17 17:37:51 -08:00
Saad Ali 526578679b Update OWNERS 2017-01-17 17:36:34 -08:00
Saad Ali 6500f08e2f Update OWNERS 2017-01-17 17:32:49 -08:00
Saad Ali 5783a0ec4c Update OWNERS 2017-01-17 17:24:35 -08:00
Saad Ali a420973187 Update OWNERS 2017-01-17 16:36:50 -08:00
Saad Ali d25c20bc3f Update OWNERS 2017-01-17 16:35:21 -08:00
Saad Ali d6ba2fc37a Update OWNERS 2017-01-17 16:34:34 -08:00
Saad Ali 7c67211734 Update OWNERS 2017-01-17 16:33:13 -08:00
Saad Ali b0e588eec2 Update OWNERS 2017-01-17 16:31:46 -08:00
Saad Ali cb1bbf14af Update OWNERS 2017-01-17 16:31:03 -08:00
Saad Ali 7918a8e8c2 Update OWNERS 2017-01-17 16:28:05 -08:00
Saad Ali 8e371e6dbf Update OWNERS 2017-01-17 16:26:16 -08:00
Saad Ali c8fbfd93df Update OWNERS 2017-01-17 16:24:46 -08:00
Saad Ali 04f20a06a6 Update OWNERS 2017-01-17 16:24:25 -08:00
Saad Ali 9f1181dc55 Update OWNERS 2017-01-17 16:24:01 -08:00
Saad Ali dc9eea2f3c Update OWNERS 2017-01-17 16:22:36 -08:00
Saad Ali 16cbb574e4 Update OWNERS 2017-01-17 16:20:24 -08:00
Kubernetes Submit Queue d357a72161 Merge pull request #40039 from timstclair/api-redirect
Automatic merge from submit-queue

Enable streaming proxy redirects by default (beta)

Prerequisite to moving CRI to Beta.

I'd like to enable this early in our 1.6 cycle to get plenty of test coverage before release.

@yujuhong @liggitt 

```release-note
Follow redirects for streaming requests (exec/attach/port-forward) in the apiserver by default (alpha -> beta).
```
2017-01-17 16:18:48 -08:00
Saad Ali 70ed66cdf8 Update OWNERS 2017-01-17 16:14:14 -08:00
Saad Ali 8159e620a1 Update OWNERS 2017-01-17 16:13:17 -08:00
Saad Ali 602b682a2a Update OWNERS 2017-01-17 16:12:45 -08:00
Saad Ali 7ed31e4761 Update OWNERS 2017-01-17 16:08:57 -08:00
Saad Ali b4ac15ae05 Update OWNERS 2017-01-17 16:05:40 -08:00
juanvallejo 430283b973 add OutputsRawFormat helper; default show-all on multiple resource kinds 2017-01-17 17:07:35 -05:00
Antoine Pelisse ca964a1872 Update OWNERS approvers and reviewers: pkg/cloudprovider 2017-01-17 13:42:07 -08:00
Clayton Coleman bcde05753b
Correct import statements 2017-01-17 16:18:18 -05:00
Clayton Coleman 660095776a
generated: staging 2017-01-17 16:17:20 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Clayton Coleman 54d8ed001d
Move ObjectMeta to metav1 2017-01-17 16:17:13 -05:00
Tim St. Clair b42663bb14
Enable streaming proxy redirects by default (beta) 2017-01-17 12:56:03 -08:00
Kubernetes Submit Queue e5fe366eaf Merge pull request #39894 from deads2k/client-03-remove-old
Automatic merge from submit-queue

Remove packages which are now apimachinery

Removes all the content from the packages that were moved to `apimachinery`.  This will force all vendoring projects to figure out what's wrong.  I had to leave many empty marker packages behind to have verify-godep succeed on vendoring heapster.

@sttts straight deletes and simple adds
2017-01-17 12:00:00 -08:00
Shyam Jeedigunta 814c850fe5 Made tracing of calls and container lifecycle steps in FakeDockerClient optional 2017-01-17 18:56:39 +01:00
Cole Mickens 8adcf077f3 azure disk: restrict length of name 2017-01-17 09:38:53 -08:00
Kubernetes Submit Queue c0a1fa73f5 Merge pull request #39939 from resouer/statefulset
Automatic merge from submit-queue (batch tested with PRs 34763, 38706, 39939, 40020)

Use Statefulset instead in e2e and controller

Quick fix ref: #35534

We should finish the issue to meet v1.6 milestone.
2017-01-17 09:14:51 -08:00
Kubernetes Submit Queue 27d486c663 Merge pull request #38706 from deads2k/auth-12-stomp-anonymous
Automatic merge from submit-queue (batch tested with PRs 34763, 38706, 39939, 40020)

prevent anonymous auth and allow all

https://github.com/kubernetes/kubernetes/pull/38696 for master

@kubernetes/sig-auth 

```release-note
Anonymous authentication is now automatically disabled if the API server is started with the AlwaysAllow authorizer.
```
2017-01-17 09:14:49 -08:00
Kubernetes Submit Queue 65f6875ec4 Merge pull request #34763 from juanvallejo/jvallejo/add-warning-on-export-invalid-output-version
Automatic merge from submit-queue

log info on invalid --output-version

**Release note**:

``` release-note
release-note-none
```

Object versions default to the current version (v1) when a specified
`--output-version` is invalid. This patch logs a warning when this is
the case. Cases affected are all commands with the `--output-version`
option, and anywhere runtime objects are converted to versioned objects.

**Example**

```
$ kubectl get pod <mypod> -o json --output-version=invalid
W1013 17:24:16.810278   26719 result.go:238]  info: the output version
specified (invalid) is invalid, defaulting to v1
{
        "kind": "Pod",
            "apiVersion": "v1",
                "metadata": {
                            "name": "mypod",
                                    "namespace": "test",
...
```
2017-01-17 09:01:31 -08:00
Kubernetes Submit Queue f7305e6f43 Merge pull request #39974 from deads2k/api-60-move-patch
Automatic merge from submit-queue

Move PatchType to apimachinery/pkg/types

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

`PatchType` is shared by the client and server, they have to agree, and its critical for our API to function.

@smarterclayton @kubernetes/sig-api-machinery-misc
2017-01-17 07:29:06 -08:00
deads2k de725e56e2 prevent anonymous auth and allow all 2017-01-17 10:16:33 -05:00
Kubernetes Submit Queue 3aa29bca4f Merge pull request #40009 from kargakis/fix-dryrun-for-rollout
Automatic merge from submit-queue (batch tested with PRs 39911, 40002, 39969, 40012, 40009)

kubectl: fix rollback dryrun when version is not specified

@kubernetes/sig-cli-misc
2017-01-17 06:47:00 -08:00
juanvallejo e796ea28b9 don't show deleted pull secrets - kubectl describe
This patch appends "(not found)" to any image pull secrets that are
present in a service account, but no longer present in the namespace.
2017-01-17 09:38:50 -05:00
deads2k f31ecdd0f7 generated changes 2017-01-17 08:32:05 -05:00
deads2k 26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
vefimova d925439727 Fixed forming of pod's Search line in resolv.conf:
- exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries
   (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming
Fixes #29270
2017-01-17 13:18:26 +00:00
deads2k a6b655fb6a add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
deads2k 67fac70ea3 remove files moved to apimachinery 2017-01-17 07:46:34 -05:00
Dr. Stefan Schimanski 7271921405 Fix wrong rename pkg/storage.Is{TestFail -> Conflict} 2017-01-17 13:18:11 +01:00
Dr. Stefan Schimanski 52f6831576 genericapiserver: cut off kube pkg/version dependency 2017-01-17 12:34:05 +01:00
Kubernetes Submit Queue f0b0cd0399 Merge pull request #39945 from sttts/sttts-cutoff-pkg-serviceaccount-dep
Automatic merge from submit-queue

genericapiserver: cut off pkg/serviceaccount dependency

**Blocked** by pkg/api/validation/genericvalidation to be split up and moved into apimachinery.
2017-01-17 03:09:21 -08:00
Michail Kargakis 9c820a5793 kubectl: fix rollback dryrun when version is not specified 2017-01-17 12:01:09 +01:00
Kubernetes Submit Queue 550f8be73a Merge pull request #39997 from soltysh/cronjob_leftovers
Automatic merge from submit-queue (batch tested with PRs 39948, 39997)

Fix ScheduledJob -> CronJob rename leftovers

I found a few leftovers from the rename I did some time ago.

@kubernetes/sig-apps-misc ptal
2017-01-17 02:09:34 -08:00
Kubernetes Submit Queue 3b4e222184 Merge pull request #39948 from sttts/sttts-move-pkg-api-rest-into-genericapiserver
Automatic merge from submit-queue

Move pkg/api/rest into genericapiserver

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

**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**:

**Release note**:

```release-note
```
2017-01-17 02:08:10 -08:00
Dr. Stefan Schimanski 3a17d433aa Move first pkg/api/validation's into apimachinery 2017-01-17 10:30:35 +01:00
Harry Zhang a88cbdc52d Update bazel 2017-01-17 16:55:06 +08:00
Kubernetes Submit Queue 9d2fce7c22 Merge pull request #39608 from peay/cronjob-too-many-times-to-list
Automatic merge from submit-queue

Do not list CronJob unmet starting times beyond deadline

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

See #36311. `getRecentUnmetScheduleTimes` gives up after 100 unmet times to avoid wasting too much CPU or memory generating all the times, as it generates them sequentially.

When concurrency is forbidden, this is conceptually un-necessary: we only need the last unmet start time. This suggests that when concurrency is forbidden, we could generate times by going backward in time from now. This is not very practical as CronJob currently relies on a package that only provides `Next` and no `Prev`. Hand-cooking a `Prev` does not seem like a good idea. I could submit a PR to the cron library to add a `Prev` method, and use that when concurrency is forbidden through something like `getLastUnmetScheduleTime`. This would be `O(1)` and there would be no limit involved.

(edit: actually, even for the other concurrency settings, we only start the last unmet start times -- there is a `TODO` in the controller to actually start all of them, but that is not implemented at the moment. This means the solution would apply, at least temporarily, to all concurrency settings).

cc @soltysh what do you think?

In the meantime, I would suggest to do something simple. Currently, the user has no way to configure anything to ensure that his CronJob will not get stuck if one job takes more that 100 unmet times.

 `getRecentUnmetScheduleTimes` starts with an initial time corresponding to the last start (or to the creation of the CronJob, if nothing has started yet). However, when `StartingDeadlineSeconds` is set, the controller will not start anything that is older than the deadline, so if the last start is way beyond the deadline, we are generating potentially lots of unmet start times that will not be considered by the scheduler for scheduling anyway.

Consider a job running every minute, where the last instance has taken 120 minutes. This means there are more than 100 unmet times when we start counting from the last start time.

**The PR makes `getRecentUnmetScheduleTimes` only consider times that do not fall beyond the deadline.** Here, the CronJob can be configured with a `StartingDeadlineSeconds` of, say, 10 minutes. After the 120min job has run, `getRecentUnmetScheduleTimes` will only consider the times in the last 10 minutes from now, and will not get stuck.

As a side note on the max. number of unmet times to use as limits in terms of CPU used by the controller: I have run a quick benchmark on my i7 mac. Schedules corresponding to "once a week" tend to be more expensive to generate unmet times for. Just FYI.

```
+--------------+---------------+--------------+
|   SCHEDULE   | MISSED STARTS |    TIMING    |
+--------------+---------------+--------------+
| */1 * * * ?  |           100 | 383.645µs    |
| */30 * * * ? |           100 | 354.765µs    |
| 30 1 * * ?   |           100 | 1.065124ms   |
| 30 1 * * 0   |           100 | 1.80034ms    |
| */1 * * * ?  |           500 | 1.341365ms   |
| */30 * * * ? |           500 | 1.814441ms   |
| 30 1 * * ?   |           500 | 8.475012ms   |
| 30 1 * * 0   |           500 | 10.020613ms  |
| */1 * * * ?  |          1000 | 2.551697ms   |
| */30 * * * ? |          1000 | 4.075813ms   |
| 30 1 * * ?   |          1000 | 17.674945ms  |
| 30 1 * * 0   |          1000 | 19.149324ms  |
| */1 * * * ?  |         10000 | 25.725531ms  |
| */30 * * * ? |         10000 | 87.520022ms  |
| 30 1 * * ?   |         10000 | 174.29216ms  |
| 30 1 * * 0   |         10000 | 196.565748ms |
+--------------+---------------+--------------+
```

using

```.go
package main

import (
    "fmt"
    "time"
    "os"
    "strconv"

    "github.com/robfig/cron"
    "github.com/olekukonko/tablewriter"
)

func timeSchedule(schedule string, iterations int) (time.Duration) {
    sched, err := cron.ParseStandard(schedule)

    if err != nil {
        panic(fmt.Sprintf("Unparseable schedule: %s", err))
    }

    start := time.Now()
    t := time.Now()

    for i := 1; i <= iterations; i++ {
        t = sched.Next(t)
    }

    return time.Since(start)
}

func main() {
    table := tablewriter.NewWriter(os.Stdout)
    table.SetHeader([]string{"Schedule", "Missed starts", "Timing"})

    schedules := []string{"*/1 * * * ?", "*/30 * * * ?", "30 1 * * ?", "30 1 * * 0"}
    iteration_nums := []int{100, 500, 1000, 10000}

    for _, iterations := range iteration_nums {
        for _, schedule := range schedules {
            table.Append([]string{schedule,
                                  strconv.Itoa(iterations),
                                  timeSchedule(schedule, iterations).String()})
        }
    }
    table.Render()
}
```

**Which issue this PR fixes**: fixes #36311

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-17 00:41:45 -08:00
Dr. Stefan Schimanski bf307d9948 genericapiserver: cut off pkg/serviceaccount dependency 2017-01-17 09:36:10 +01:00
Dr. Stefan Schimanski 8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski 5c88b7d05a Fix imports 2017-01-17 09:30:30 +01:00
Dr. Stefan Schimanski e561d5c1c9 Move pkg/api/rest into pkg/genericapiserver/api/rest 2017-01-17 09:29:13 +01:00
Maciej Szulik 4a0c9fa536 Fix ScheduledJob -> CronJob rename leftovers 2017-01-17 09:24:07 +01:00
Kubernetes Submit Queue d270ec0ed2 Merge pull request #37680 from mfojtik/report-pod-name
Automatic merge from submit-queue

Report the Pod name and namespace when kubelet fails to sync the container

This helps debugging problems with SELinux (and other problems related to the Docker failed to run the container) as currently only the UUID of the Pod is reported:

```
Error syncing pod 670f607d-b5a8-11a4-b673-005056b7468b, skipping: failed to "StartContainer" for "deployment" with RunContainerError: "runContainer: Error response from daemon: Relabeling content in /usr is not allowed."
```

Here it would be useful to know what pod in which namespace is trying to mount the "/usr".
2017-01-16 23:59:44 -08:00
Kubernetes Submit Queue 4937b05a46 Merge pull request #39853 from xingzhou/typo
Automatic merge from submit-queue

Fixed typo.
2017-01-16 20:44:43 -08:00
Harry Zhang b8678ad130 Use statefulset instead in controller
Rename e2e folder to statefulset
2017-01-17 10:36:37 +08:00
Kubernetes Submit Queue f74b4bbbad Merge pull request #38094 from yarntime/fix_update_typo
Automatic merge from submit-queue

fix typos

fix typos.
2017-01-16 18:22:33 -08:00
Kubernetes Submit Queue adbf7137bb Merge pull request #39916 from smarterclayton/generate_for_staging
Automatic merge from submit-queue

Generate changes for staged repos (apimachinery, apiserver)

Restores OpenAPI types, deepcopy, and bazel for meta/v1 types.

Fixes #39912
2017-01-16 16:04:36 -08:00
Kubernetes Submit Queue 52a6ad0acb Merge pull request #39890 from deads2k/generic-23-post-client-go-update
Automatic merge from submit-queue

move name generation to generic api server storage helpers

Move name generation to the genericapiserver since only the server needs to know about it.

@kubernetes/sig-api-machinery-misc @sttts
2017-01-16 14:54:14 -08:00
Kubernetes Submit Queue 6fe8ed738d Merge pull request #39401 from AdoHe/delete_refactor
Automatic merge from submit-queue (batch tested with PRs 39806, 39887, 39401)

refactor delete to remove cobra dependency

FYI. As part of CLI Q1 roadmap, we would like to reduce the dependency of Cobra from actual commands implementations. In this PR, I tried to refactor delete command to achieve this. @kubernetes/sig-cli-misc a quick review is quite welcome, and I am just working on more PRs.
2017-01-16 13:41:36 -08:00
Kubernetes Submit Queue adbf6c6eb6 Merge pull request #39887 from juanvallejo/jvallejo/export-list-of-user-resources
Automatic merge from submit-queue (batch tested with PRs 39806, 39887, 39401)

export list of user resources

This patch exports the list of "userResources" found in
`pkg/kubectl/cmd/util/shortcut_resmapper.go` to allow its use in
external packages and clients.

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

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

cc @deads2k
2017-01-16 13:41:35 -08:00
Clayton Coleman e365195a54
generated: OpenAPI is now correct 2017-01-16 16:13:31 -05:00
Clayton Coleman 211b1df998
Mark meta/v1 as writable temporarily
Allow openapi-gen tag to be removed from the directory.
2017-01-16 16:13:30 -05:00
Clayton Coleman 62d1ae96c1
Generate for staging directories that are not client-go 2017-01-16 16:13:29 -05:00
deads2k a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
deads2k 8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
deads2k 7993e7c8aa move openapi types to pkg/openapi 2017-01-16 13:40:14 -05:00
deads2k dd7cd951ce move meta/v1/validation to apimachinery 2017-01-16 13:40:13 -05:00
Kubernetes Submit Queue 6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
Kubernetes Submit Queue ab5c44efd5 Merge pull request #39946 from sttts/sttts-BuildDefaultStorageFactory-to-kubeapiserver
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

genericapiserver: cut off pkg/apis/extensions and pkg/storage dependencies

Move BuildDefaultStorageFactory to kubeapiserver.
2017-01-16 10:37:41 -08:00
Kubernetes Submit Queue 4811ad0231 Merge pull request #38592 from krousey/client-context
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

Add optional per-request context to restclient

**What this PR does / why we need it**: It adds per-request contexts to restclient's API, and uses them to add timeouts to all proxy calls in the e2e tests. An entire e2e shouldn't hang for hours on a single API call.

**Which issue this PR fixes**: #38305

**Special notes for your reviewer**:

This adds a feature to the low-level rest client request feature that is entirely optional. It doesn't affect any requests that don't use it. The api of the generated clients does not change, and they currently don't take advantage of this.

I intend to patch this in to 1.5 as a mostly test only change since it's not going to affect any controller, generated client, or user of the generated client.


cc @kubernetes/sig-api-machinery 
cc @saad-ali
2017-01-16 10:37:38 -08:00
Kubernetes Submit Queue 9118a1252f Merge pull request #39915 from pmorie/serialization-test
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

Make api serialization test easier to follow

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

This PR makes the serialization test easier to understand and is informed by the recent experience of writing a new serialization test in SIG service catalog.

**Release note**:

```release-note
NONE
```
2017-01-16 09:26:19 -08:00