Commit Graph

17210 Commits (de55e68a9553b55d1bd0ffd3a783db45fe4b8abe)

Author SHA1 Message Date
Kubernetes Submit Queue 1552edbf0c Merge pull request #37366 from xilabao/extend-cmd-valid-resources-information
Automatic merge from submit-queue (batch tested with PRs 37366, 36373)

extend cmd valid resources information about roles
2016-12-05 08:13:40 -08:00
Kubernetes Submit Queue 45a436ac24 Merge pull request #36909 from sttts/sttts-discovery-with-verbs
Automatic merge from submit-queue (batch tested with PRs 37370, 37003, 36909)

Add verbs to APIResourceInfo for discovery

Verbs will be used by generic controllers (gc, namespace) to avoid unnecessary API calls, reducing load on the apiserver. E.g. not all objects can be deleted.

Example:
```json
{
  "kind": "APIResourceList",
  "apiVersion": "v1",
  "groupVersion": "batch/v1",
  "resources": [
    {
      "name": "jobs",
      "namespaced": true,
      "kind": "Job",
      "verbs": [
        "create",
        "delete",
        "deletecollection",
        "get",
        "list",
        "update",
        "watch"
      ]
    },
    {
      "name": "jobs/status",
      "namespaced": true,
      "kind": "Job",
      "verbs": [
        "create",
        "get"
      ]
    }
  ]
}
```
2016-12-05 06:48:41 -08:00
Kubernetes Submit Queue 57b5cdd37d Merge pull request #37003 from deads2k/client-01-proxy-rt
Automatic merge from submit-queue (batch tested with PRs 37370, 37003, 36909)

add auth proxy roundtripper

Adds a round tripper which adds auth proxy fields based on user.Info you can pull from a context.  It clears existing headers first to be sure that these aren't accidentally set ahead of time.

@nikhiljindal per our conversation.  This is what I'm using downstream.
2016-12-05 06:48:40 -08:00
Kubernetes Submit Queue 4a91faa1b6 Merge pull request #37370 from gmarek/test-refactor
Automatic merge from submit-queue

Make NodeController test utils usable from outside

Required to fix tests for #37365 and useful in general.
2016-12-05 06:38:32 -08:00
Kubernetes Submit Queue fdfe315bc2 Merge pull request #37986 from humblec/glusterfs-clusterid-nil-allow
Automatic merge from submit-queue (batch tested with PRs 37307, 29606, 37986)

Allow glusterfs dp volume creation  for empty clusterid parameter in sc.

Why this patch is needed? 

The `strings.split()` (https://github.com/kubernetes/kubernetes/pull/37986/files#diff-e97253dd603331ffca81131a4b67264fR700) returns a slice of `single element("empty") ` when the split is attempted on a string. This is expected according to  `https://golang.org/pkg/strings/#Split` and `https://github.com/golang/go/issues/13075`. This make the provisioner to fail, if `clusterid` is not defined in the SCs. This patch make sure the split is attempted only when clusterid is mentioned in the sc parameter.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-05 05:41:44 -08:00
deads2k 61b5585bac add auth proxy roundtripper 2016-12-05 08:18:47 -05:00
Kubernetes Submit Queue be5d1724f5 Merge pull request #37420 from zdj6373/kubelet-log
Automatic merge from submit-queue (batch tested with PRs 37208, 37446, 37420)

Kubelet log modification

Keep in line with the other error logs in the function.
After return, the caller records the error log.Delete redundant logs
2016-12-05 04:47:44 -08:00
Kubernetes Submit Queue 3888ea75c6 Merge pull request #37208 from gmarek/controllers
Automatic merge from submit-queue (batch tested with PRs 37208, 37446, 37420)

Change 'controller.go' filenames to more meaningfull ones

Controller logic should sit in uniquely named file, not `controller.go`, as the latter makes it very hard to understand controller-manager logs.

@deads2k @bgrant0607 @soltysh @gtank
2016-12-05 04:47:39 -08:00
Dr. Stefan Schimanski 2dff13f332 Update generated files 2016-12-05 12:42:31 +01:00
Dr. Stefan Schimanski 24e24fc7bb Add verb support to gc and namespace controllers 2016-12-05 12:36:05 +01:00
Dr. Stefan Schimanski 458d2b2fe4 Add verb support for discovery client 2016-12-05 12:36:05 +01:00
Dr. Stefan Schimanski 4d1d98c49a Remove namespace controller pod precedence 2016-12-05 12:36:05 +01:00
Dr. Stefan Schimanski a8ebc131de Workaround ugorji/go/codecs regression 2016-12-05 12:36:04 +01:00
Dr. Stefan Schimanski 0301487de0 Add verbs to APIResource for discovery 2016-12-05 12:36:04 +01:00
Kubernetes Submit Queue 444e082441 Merge pull request #37476 from wojtek-t/get_options
Automatic merge from submit-queue

Create GetOptions to allow passing "ResourceVersion" to GET requests.

Ref #37473

@kubernetes/sig-api-machinery @smarterclayton
2016-12-05 03:20:02 -08:00
Kubernetes Submit Queue 68ca638164 Merge pull request #35672 from zlabjp/fix-list-and-watch-goroutine-leak
Automatic merge from submit-queue

Fix resync goroutine leak in ListAndWatch

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

This PR fixes resync goroutine leak in ListAndWatch function

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

fixes #35015

**Special notes for your reviewer**:

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
```

Previously, we had no way to stop resync goroutine when ListAndWatch
returned.  goroutine leaked every time ListAndWatch returned, for
example, with error.  This commit adds another channel to signal that
resync goroutine should exit when ListAndWatch returns.
2016-12-05 02:41:33 -08:00
gmarek 94f091ad03 Make NodeController test utils usable from outside 2016-12-05 10:56:06 +01:00
Kubernetes Submit Queue 3a5fd6b6c1 Merge pull request #36064 from gmarek/inflight
Automatic merge from submit-queue

Split inflight requests into read-only and mutating groups

cc @smarterclayton @lavalamp @caesarxuchao 

```release-note
API server have two separate limits for read-only and mutating inflight requests.
```
2016-12-05 00:53:32 -08:00
Wojciech Tyczynski c1699253ff Regenerate autogenerated files 2016-12-05 09:18:57 +01:00
gmarek 770e1c289a Change 'controller.go' filenames to more meaningfull ones 2016-12-05 09:12:22 +01:00
Humble Chirammal e6a300d735 Allow glusterfs dp volume creation for empty clusterid parameter in sc.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-05 13:36:10 +05:30
Wojciech Tyczynski f84196e725 Introduce GetOptions type 2016-12-05 08:21:20 +01:00
Wojciech Tyczynski 69bb0fce86 Update comments for ListOptions 2016-12-05 08:19:46 +01:00
Kubernetes Submit Queue 433c6bede3 Merge pull request #37066 from xilabao/update-label-filter-prompt
Automatic merge from submit-queue

update label filter prompt

I have to look up the meaning of selector in docs/user-guide/labels.md.  I think  we could print more info when run "--help".
2016-12-04 22:26:13 -08:00
xilabao b95dcfb424 update label filter prompt 2016-12-05 11:03:21 +08:00
Kubernetes Submit Queue 81177226a8 Merge pull request #37679 from zdj6373/proxy-accept
Automatic merge from submit-queue

Code optimization

Accept function, the same sentence information repeated three times, under the optimization, recorded in the call function
2016-12-04 17:16:08 -08:00
Kubernetes Submit Queue 513893c96e Merge pull request #37789 from yarntime/check_min_max
Automatic merge from submit-queue

check the value of min and max in kubectl

check the value of min and max in kubectl.
2016-12-04 16:39:24 -08:00
Kubernetes Submit Queue bc342006bf Merge pull request #37886 from obnoxxx/gluster-dp-gid
Automatic merge from submit-queue

Implement GID security for the GlusterFS dynamic provisioner.

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

This PR implements GID security for the glusterfs dynamic provisioner.
It is a reworked version of PR #37549 .

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

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
The glusterfs dynamic volume provisioner will now choose a unique GID for new persistent volumes from a range that can be configured in the storage class with the "gidMin" and "gidMax" parameters. The default range is 2000 - 4294967295 (max uint32).
```
2016-12-04 14:34:01 -08:00
Kubernetes Submit Queue ce0d2ac8ee Merge pull request #37688 from nvartolomei/reflector-handle-store-errors
Automatic merge from submit-queue

Add error handling for store operations in cache/reflector

In my opinion the errors there should be returned, but to have minimal impact I just added runtime error handler.

Let me know what you think.
2016-12-04 10:04:45 -08:00
Kubernetes Submit Queue 81d788dd6e Merge pull request #37534 from smarterclayton/move_unversion
Automatic merge from submit-queue (batch tested with PRs 36816, 37534)

Move pkg/api/unversioned to pkg/apis/meta/v1

This moves code from using pkg/api/unversioned to pkg/apis/meta/v1 with the `metav1` local package name.

Built on top of #37532 (the first three commits related to ExportOptions)

Part of #37530
2016-12-03 18:30:48 -08:00
Kubernetes Submit Queue 71182d826d Merge pull request #36816 from deads2k/api-43-front-proxy
Automatic merge from submit-queue

plumb in front proxy group header

Builds on https://github.com/kubernetes/kubernetes/pull/36662 and https://github.com/kubernetes/kubernetes/pull/36774, so only the last commit is unique.

This completes the plumbing for front proxy header information and makes it possible to add just the front proxy header authenticator.

WIP because I'm going to assess it in use downstream.
2016-12-03 18:01:42 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman 6536dcfdc2
refactor: move pkg/api/unversioned to pkg/apis/meta/v1 2016-12-03 18:57:31 -05:00
Kubernetes Submit Queue 12801e8bbb Merge pull request #37649 from smarterclayton/top_node
Automatic merge from submit-queue

kubectl top pod|node should handle when Heapster is somewhere else

OpenShift runs Heapster on HTTPS, which means `top node` and `top pod`
are broken because they hardcode 'http' as the scheme. Provide an
options struct allowing users to specify `--heapster-namespace`,
`--heapster-service`, `--heapster-scheme`, and `--heapster-port` to the
commands (leveraging the existing defaults).

@kubernetes/sig-metrics makes top a little more useful in other spots
2016-12-03 15:04:14 -08:00
Kubernetes Submit Queue db323e9885 Merge pull request #36646 from kargakis/create-pdb-subcommand
Automatic merge from submit-queue (batch tested with PRs 38049, 37823, 38000, 36646)

kubectl: add create pdb subcommand

@mwielgus @mml @kubernetes/kubectl

```release-note
Add kubectl create poddisruptionbudget command
```
2016-12-03 14:20:54 -08:00
Kubernetes Submit Queue 723a200c09 Merge pull request #37823 from danwinship/better-fuzzing
Automatic merge from submit-queue (batch tested with PRs 38049, 37823, 38000, 36646)

Test 0-length-arrays in fuzzing tests

While hacking on #37289 I noticed that our fuzzing tests test nil slices and slices of length 1, but not slices of length 0, meaning we aren't testing that 0-length slices get treated the same as nil in all the places we expect them to (and in particular, we aren't ensuring that comparisons always use api.Semantic.DeepEqual rather than reflect.DeepEqual). (Though in fact, changing the fuzzer didn't turn up any bugs, so maybe this effectively gets tested somewhere else...)

`fuzz.New().NilChance(.5).NumElements(0, 1)` means we end up generating `nil` 50% of the time, a length 0 array 25% of the time, and a length 1 array 25% of the time... maybe it should be `fuzz.New().NilChance(.33).NumElements(0, 1)` instead?

The gofuzz rebase is to pull in https://github.com/google/gofuzz/pull/20, and the other fix is just a drive-by.
2016-12-03 14:20:50 -08:00
Kubernetes Submit Queue ad72d1728c Merge pull request #37547 from sttts/sttts-cut-off-genericapserver-from-registry
Automatic merge from submit-queue

Cut genericapserver->registry dependency

Towards moving genericapiserver into staging.
2016-12-03 12:22:20 -08:00
Kubernetes Submit Queue 16a9c0b49c Merge pull request #37692 from wojtek-t/storage_resource_version_for_get
Automatic merge from submit-queue

Handle RV in Get calls to storage interface.

Ref #37473
2016-12-03 11:44:29 -08:00
Dr. Stefan Schimanski b2b0142b6f Update bazel 2016-12-03 18:35:18 +01:00
Dr. Stefan Schimanski 1f5511b131 Move RESTStorageProvider interface into pkg/master 2016-12-03 18:35:15 +01:00
Dr. Stefan Schimanski eeb582e53f Move DefaultServiceIPRange into pkg/master 2016-12-03 18:34:22 +01:00
Kubernetes Submit Queue 332305cba9 Merge pull request #37697 from deads2k/auth-06-simplify-authz
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

simplify the authorization attribute getter

Construct the authorization attributes directly from the context.  This eliminates unnecessary redirection.  

@sttts
2016-12-03 08:56:01 -08:00
Kubernetes Submit Queue f3d463f114 Merge pull request #37643 from ncdc/informer-gen
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

Add generated informers

Add informer-gen and the informers it generates. We'll do follow-up PRs to convert everything currently using the hand-written informers to the generated ones.

TODO:

- [x] switch to `GroupVersionResource`
- [x] finish godoc

@deads2k @caesarxuchao @sttts @liggitt
2016-12-03 08:55:57 -08:00
Kubernetes Submit Queue 959d386ccf Merge pull request #36709 from hongchaodeng/e3
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

[etcd] test cleanup: remove unnecessary AddPrefix()

What?
Remove etcdtest.AddPrefix() in tests. They will be automatically prepended in etcd storage.

Why?
ref: #36290 #36374
After the change, it will double prepend.
2016-12-03 08:55:56 -08:00
Kubernetes Submit Queue b1a3f3794a Merge pull request #35300 from deads2k/rbac-17-subjectlocator
Automatic merge from submit-queue (batch tested with PRs 35300, 36709, 37643, 37813, 37697)

add rbac action to subjects type

This adds the ability to go from an authorization action to the list subjects who have the power to perform the action.  This will be used to either back an RBAC specific endpoint or generic authorization endpoint.  Because of the way authorization works today, the set of subjects returned will always be a subset of those with access since any authorizer can say yes.

@kubernetes/sig-auth
2016-12-03 08:55:54 -08:00
Kubernetes Submit Queue b926fa5009 Merge pull request #37808 from hex108/add_retry_interval
Automatic merge from submit-queue (batch tested with PRs 37094, 37663, 37442, 37808, 37826)

Add some sleep between each retry to set container's oom scroe

Ref https://github.com/kubernetes/kubernetes/issues/23607#issuecomment-264135015
2016-12-03 04:27:52 -08:00
Kubernetes Submit Queue 91d8c41147 Merge pull request #36732 from oulinbao/refactor_describe_containers
Automatic merge from submit-queue

Refactor describe.go with PrefixWriter

**What this PR does / why we need it**:
 refactor describeContainers function and decrease gocyclo result

**Special notes for your reviewer**:
the new PR for 36032
https://github.com/kubernetes/kubernetes/pull/36032

**Release note**:
```release-note
```NONE
2016-12-03 01:28:11 -08:00
Wojciech Tyczynski ec247315be Handle RV in Get calls to storage interface. 2016-12-03 10:18:43 +01:00
Kubernetes Submit Queue 6fd00e9f56 Merge pull request #37678 from tsmetana/issue_37377
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

Fix issue #37377: Report an event on successful PVC provisioning

This is a simple patch to fix the issue #37377: On a successful PVC provisioning an event is emitted so it's clear the provisioning actually succeeded.

cc: @jsafrane
2016-12-02 23:32:50 -08:00