Commit Graph

17662 Commits (6dd760d312d7b236509754ff1d566e0594247767)

Author SHA1 Message Date
Kubernetes Submit Queue aa86fca07f Merge pull request #38547 from rkouj/make-unmount-operation-idempotent
Automatic merge from submit-queue

Unmount operation should not fail if volume is already unmounted

**What this PR does / why we need it**:
If the volume is already unmounted from the pod, another unmount operation should not fail.

fixes:  https://github.com/kubernetes/kubernetes/issues/37657
2016-12-19 19:45:27 -08:00
Kubernetes Submit Queue d373d1c467 Merge pull request #38917 from foxyriver/if-statement-must-be-true
Automatic merge from submit-queue (batch tested with PRs 38426, 38917, 38891, 38935)

if statement must be true

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

if len(metrics.Items)==0, the function would been returned. so the statement if len(metrics.Items) > 0 is redudant, it must be true.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2016-12-19 18:18:24 -08:00
Kubernetes Submit Queue 9484212b00 Merge pull request #38426 from abrarshivani/fix_lsi_logic_sas_bug
Automatic merge from submit-queue

Changed default scsi controller type in vSphere Cloud Provider

This PR changes default scsi controller to ```pvscsi``` in vSphere Cloud Provider. Fixes #37527
2016-12-19 18:08:58 -08:00
Kubernetes Submit Queue 2939c57b87 Merge pull request #36529 from apelisse/owners-pkg-apiserver
Automatic merge from submit-queue

Curating Owners: pkg/apiserver

cc @lavalamp @smarterclayton @nikhiljindal

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)
2016-12-19 17:28:08 -08:00
Kubernetes Submit Queue 5084ae9f34 Merge pull request #36531 from apelisse/owners-pkg-registry
Automatic merge from submit-queue

Curating Owners: pkg/registry

cc @lavalamp @smarterclayton @wojtek-t

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)
2016-12-19 17:27:50 -08:00
Kubernetes Submit Queue d21ec3c200 Merge pull request #36526 from apelisse/owners-pkg-client
Automatic merge from submit-queue

Curating Owners: pkg/client

cc @lavalamp @caesarxuchao @mikedanese @timothysc @smarterclayton @krousey @deads2k

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)
2016-12-19 17:27:33 -08:00
Kubernetes Submit Queue e3a4a3675b Merge pull request #38875 from sttts/sttts-move-pkg-apiserver
Automatic merge from submit-queue

pkg/apiserver: split up monolithic package

**Based on** https://github.com/kubernetes/kubernetes/pull/38191

This is a first step to integrate pkg/apiserver with pkg/genericapiserver into a common package structure. For this
- pkg/apiserver is cleaned up from code which does not belong there, 
- split up into pkg/apiserver, pkg/apiserver/handlers{,/negotation,/helpers,/errors}
2016-12-19 17:26:55 -08:00
rkouj c14d47dffe Use common unmount util func for TearDownAt() 2016-12-19 16:40:55 -08:00
Kubernetes Submit Queue 874fca652d Merge pull request #38086 from tianshapjq/reduce-decode-times
Automatic merge from submit-queue

Reduce decode times by changing the kubectl.Filter(runtime.Object, *PrintOptions)'s return values

**What this PR does / why we need it**:
In kubectl/cmd/get.go, we use the function filterFuncs.Filter() to decode data and filter the object. But in the following function printer.PrintObj() decodes the data again.
I made these modifications to reduce the decoding times by changing the filterFuncs.Filter()'s returned values. We can get the decoded object from this function and pass it to the following printer.PrintObj(), so not to waste time to decode again.
2016-12-19 16:23:02 -08:00
Daniel Smith 4de1287eb2 Update OWNERS
Remove people probably not interested in this code
2016-12-19 16:22:41 -08:00
Antoine Pelisse f74183e138 Update OWNERS approvers and reviewers: pkg/registry 2016-12-19 16:22:40 -08:00
Daniel Smith fdbec92200 Update OWNERS 2016-12-19 16:21:01 -08:00
Antoine Pelisse dac49039e8 Update OWNERS approvers and reviewers: pkg/apiserver 2016-12-19 16:20:52 -08:00
Daniel Smith ae461f8a1f Update OWNERS 2016-12-19 16:05:48 -08:00
Antoine Pelisse 491fe7fde0 Update OWNERS approvers and reviewers: pkg/client 2016-12-19 16:04:55 -08:00
Dr. Stefan Schimanski d582c2d46d Update bazel and linted files 2016-12-19 23:13:14 +01:00
Dr. Stefan Schimanski 90216ce721 pkg/apiserver: split code out of pkg/apiserver
- move rest handler into handlers package
- move errors into handlers/errors package
- move negotation code into handlers/negotation package
- move http response writer helpers into handlers/responsewriter package
- split up pkg/apiserver/apiserver.go

Note: this is only an intermediate step towards a proper genericapiserver
package hierarchy.
2016-12-19 23:13:11 +01:00
Kubernetes Submit Queue 36c20d1f5e Merge pull request #38525 from juanvallejo/jvallejo/fix-panic-on-invalid-json-syntax
Automatic merge from submit-queue (batch tested with PRs 38525, 38977)

Prevent json decoder panic on invalid input

Related downstream issue: https://github.com/openshift/origin/issues/12132
```
# Can be replicated on kubectl with:
$ cat panic.json
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "",
    "labels": {
      "name": ""
    },
    "generateName": "",
    "namespace": "",
    "annotations": []
  },
  "spec": {}
},

$ kubectl create -f panic.json --validate=false
```

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

This patch handles cases where `ioutil.ReadAll` will return a single
character output on an invalid json input, causing the `Decode` method
to panic when it tries to calculate the line number for the syntax
error. The example below would cause a panic due to the trailing comma
at the end:

```
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "",
    "labels": {
      "name": ""
    },
    "generateName": "",
    "namespace": "",
    "annotations": []
  },
  "spec": {}
},
```

@kubernetes/cli-review @fabianofranz
2016-12-19 13:23:03 -08:00
Kubernetes Submit Queue ac36b0eae3 Merge pull request #38942 from brendandburns/flake
Automatic merge from submit-queue (batch tested with PRs 38942, 38958)

Refactor port allocation logic a little, deflake tests.

This should fix #38323 for real.

@xiangpengzhao @rmmh @justinsb 

Switch to manually cranking over the port filling logic, since there was a race between the allocate logic and the check to see if the port was freed up.
2016-12-19 08:45:43 -08:00
Kubernetes Submit Queue d6046aab0e Merge pull request #38903 from deads2k/cli-16-fix-generic-create
Automatic merge from submit-queue (batch tested with PRs 38080, 38903)

prevent negotation on connections that dont' require it

Not all clientconfigs require negotiation.  Before there was a patch (hardcoded to an instance variable) that allowed this.  This updates the code to allow the same as before.

@kubernetes/sig-cli @fabianofranz

@ncdc you'll want to pick
2016-12-19 07:42:45 -08:00
Kubernetes Submit Queue 40bed8e189 Merge pull request #38080 from kargakis/requeue-on-selector-updates
Automatic merge from submit-queue

controller: sync deployments once they don't overlap anymore

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

@kubernetes/deployment
2016-12-19 07:31:15 -08:00
Kubernetes Submit Queue 75dfb21018 Merge pull request #38961 from wojtek-t/avoid_allocations_in_cacher
Automatic merge from submit-queue (batch tested with PRs 34353, 33837, 38878, 38961)

Reduce amount of allocations in cacher

Currently we are unnecessary copying stuff around in cacher.

This results in __tens of megabytes__ of allocations per __second__ in large clusters. This in turn results in expensive GC. Should help with metrics.

@gmarek
2016-12-19 06:43:43 -08:00
Kubernetes Submit Queue 5f82fe76a2 Merge pull request #38878 from kubernetes/revert-38780-ds-fix1
Automatic merge from submit-queue (batch tested with PRs 34353, 33837, 38878)

Revert "daemonset: bail out after we enqueue once"

I get overzealous sometimes.

Reverts kubernetes/kubernetes#38780
2016-12-19 06:43:00 -08:00
Michail Kargakis 04c6fecbc7 controller: use defaultResync for the deployment controller 2016-12-19 14:04:15 +01:00
Michail Kargakis d19a1109e2 controller: sync deployments once they don't overlap anymore 2016-12-19 14:04:15 +01:00
Wojciech Tyczynski 457c9a2e6e Reduce amount of allocations in cacher 2016-12-19 13:51:07 +01:00
Brendan Burns 47b79de76e Refactor port allocation logic a little, deflake tests. 2016-12-18 21:18:34 -08:00
Kubernetes Submit Queue 5b2823adb9 Merge pull request #38191 from sttts/sttts-move-master-options
Automatic merge from submit-queue

Move non-generic apiserver code out of the generic packages
2016-12-17 01:25:45 -08:00
foxyriver 69c76d8398 if statement must be true 2016-12-17 11:52:41 +08:00
Kubernetes Submit Queue 9ba4a0effc Merge pull request #38908 from spxtr/wow
Automatic merge from submit-queue

Remove two zany unit tests.

These two tests aren't unit tests in the usual sense. We can consider switching them to run as verify checks, but I'm not convinced that they're even necessary.

They essentially work by searching their code for public functions with signatures that look like `FitPredicate`, then they shell out to grep to see that they're used somewhere in the source tree. This will never work in bazel.
2016-12-16 19:34:04 -08:00
Kubernetes Submit Queue 6c9a4139f3 Merge pull request #38614 from soltysh/remove_ext_jobs
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

Remove extensions/v1beta1 Job

Fixes https://github.com/kubernetes/kubernetes/issues/32763. This endpoint was deprecated in 1.5 and was planned to be removed in 1.6. 

**Release note**:
```release-note
Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator.
```
2016-12-16 18:55:37 -08:00
Kubernetes Submit Queue 425bae0cdf Merge pull request #37468 from bruceauyeung/k8s-branch-rename-constant-MaxPatchConflicts-to-maxRetryWhenPatchConflicts
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

rename constant MaxPatchConflicts to maxRetryWhenPatchConflicts

**What this PR does / why we need it**:
1. literally `MaxPatchConflicts` means max number of patch conflicts allowed during a patch operation. but actually in codes it is used to indicate max number of patch retry when patch conflicts happened.
2. there is no need to export this constant because it is only used in `resthandler.go`  and shouldn't be used in other packages.


Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2016-12-16 18:55:28 -08:00
Kubernetes Submit Queue 699964c972 Merge pull request #38836 from bprashanth/kubelet_critical
Automatic merge from submit-queue

Admit critical pods in the kubelet

Haven't verified in a live cluster yet, just unittested, so applying do-not-merge label.
2016-12-16 17:21:46 -08:00
Maciej Szulik cdec94523e Remove extensions/v1beta1 Job - generated changes 2016-12-17 00:07:25 +01:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Joe Finney b4c87a94a8 Remove two zany unit tests. 2016-12-16 14:49:05 -08:00
deads2k 9b507e8603 prevent negotation on connections that dont' require it 2016-12-16 16:26:55 -05:00
Kubernetes Submit Queue faf959b522 Merge pull request #38869 from deads2k/api-52-in-cluster
Automatic merge from submit-queue

use in-cluster kubeconfig for genericapiserver

Allow the use of the in-cluster config to communicate with the core API server for delegated authn/authz for an addon API server.

@kubernetes/sig-api-machinery @sttts
2016-12-16 11:30:27 -08:00
Mike Danese 3a6593c9f1 Revert "daemonset: bail out after we enqueue once" 2016-12-16 10:18:06 -08:00
deads2k bbcbdaffd1 use in-cluster kubeconfig for genericapiserver 2016-12-16 12:40:33 -05:00
Dr. Stefan Schimanski 7adaac79ca Update bazel 2016-12-16 17:49:23 +01:00
Dr. Stefan Schimanski aa81e1d51d pkg/apiserver: move validation.go into pkg/registry 2016-12-16 17:49:22 +01:00
Dr. Stefan Schimanski 3be6b3c045 pkg/apiserver: remove unused code 2016-12-16 17:47:47 +01:00
Robert Rati 11c577f092 [scheduling] Auto-generated file updates from moving node affinity from
annotations to api fields. #35518
2016-12-16 11:42:43 -05:00
Robert Rati 91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Dr. Stefan Schimanski 5e8ca29a76 Clean up apiserver and federation defaulting and validation 2016-12-16 17:23:43 +01:00
Dr. Stefan Schimanski 7267299c3c genericapiserver: move MasterCount and service options into master 2016-12-16 17:23:43 +01:00
Kubernetes Submit Queue 08342c1f3e Merge pull request #38825 from enj/enj/i/store_dead_code/38822
Automatic merge from submit-queue

Remove dead code in `pkg/registry/generic/registry/store.go`

Fixes #38822

Depending on the intent of the original code, the correct fix may instead be:

```go
if name, ok := p.MatchesSingle(); ok {
	key, err := e.KeyFunc(ctx, name)
	if err != nil {
		return nil, err
	}
	w, err := e.Storage.Watch(ctx, key, resourceVersion, p)
	if err != nil {
		return nil, err
	}
	if e.Decorator != nil {
		return newDecoratedWatcher(w, e.Decorator), nil
	}
	return w, nil
	// if we cannot extract a key based on the current context, the optimization is skipped
}
```

Signed-off-by: Monis Khan <mkhan@redhat.com>

cc @deads2k
2016-12-16 06:31:12 -08:00
Kubernetes Submit Queue de3b73bd43 Merge pull request #38826 from sttts/sttts-secret-routes-real-mux
Automatic merge from submit-queue

genericapiserver: turn APIContainer.SecretRoutes into a real ServeMux

The secret routes `Mux` is actually a `http.ServeMux` and we are type-casting to it. For downstream we want to wrap it into a restful container which also needs a real `http.ServeMux`.
2016-12-16 05:51:45 -08:00
Kubernetes Submit Queue 0d80ee0b8d Merge pull request #38767 from kargakis/fix-setting-container-name-in-create-deployment
Automatic merge from submit-queue

kubectl: fix 'create deployment' to set container name correctly

@kubernetes/kubectl @kubernetes/sig-cli
2016-12-16 04:38:22 -08:00