Commit Graph

17292 Commits (97854b8de591169f91c8230f77fc229ddd546ce8)

Author SHA1 Message Date
Hongchao Deng 62c0e5abc3 pkg/storage: docs on watch 0 behavior 2016-12-05 15:10:24 -08:00
Hongchao Deng 34db128af9 etcd2: watch on 0 to return ADDED always 2016-12-05 15:10:24 -08:00
Jess Frazelle 4d27212149
fix golint errors on master for 1.6
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-12-05 15:01:33 -08:00
Kubernetes Submit Queue 2c61d2f80c Merge pull request #38121 from deads2k/auth-09-remove-rbac-super
Automatic merge from submit-queue (batch tested with PRs 38111, 38121)

remove rbac super user

Cleaning up cruft and duplicated capabilities as we transition from RBAC alpha to beta.  In 1.5, we added a secured loopback connection based on the `system:masters` group name.  `system:masters` have full power in the API, so the RBAC super user is superfluous.

The flag will stay in place so that the process can still launch, but it will be disconnected.

@kubernetes/sig-auth
2016-12-05 14:14:41 -08:00
Jordan Liggitt 4359054616
Detect long-running requests from parsed request info 2016-12-05 16:46:28 -05:00
Michael Adam 8a1752f2bb glusterfs: Fix all gid types to int to prevent failures on 32bit systems
This makes all types int until we hand the GID to heketi/gluster,
at which point it's converted to int64.

It also limits the maximum usable GID ti math.MaxInt32 = 2147483647.

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-05 22:46:12 +01:00
p0lyn0mial 5f8e774517 extended RESTMappings method by a version parameter.
RESTMapping method can now rely on RESTMappings by passing versions parameter and taking the first match found by RESTMappings method. In addition
a UT that test the new method has been added.

The only change in logic to what was before is when calling RESTMapping
we search all defaultGroupVersion as opposed to just one when no mapping was found for provided versions.
2016-12-05 20:09:36 +01:00
Kubernetes Submit Queue 55f13b5729 Merge pull request #36374 from hongchaodeng/e
Automatic merge from submit-queue (batch tested with PRs 36352, 36538, 37976, 36374)

etcd3: have prefix always prepended

ref: #36290

Previously, the prefix behavior is "sometimes prefixing". If the prefix already exists for the resource path, it will ignore.
With this PR, we make sure that prefix is always prepended in etcd3 storage backend. See the discussion in #36290
2016-12-05 11:08:49 -08:00
Kubernetes Submit Queue b1366bf55d Merge pull request #37976 from deads2k/controller-01-sa
Automatic merge from submit-queue (batch tested with PRs 36352, 36538, 37976, 36374)

demonstrate separation of controller intializers

Currently, controllers are all initialized in a monster method that make it difficult to individually pick out whether there are side-effects, difficult to group related controllers for selective enablement, and impossible to determine if there are hidden dependencies.

This pull demonstrates how we can break apart the monolith and start start the process of grouping and naming controllers for selective enablement.  In addition, the use of a map will help expose dependency ordering amongst these controllers and the separate methods will make it a lot harder to have side effects.

This also moves us closer to being able to author reflective unit tests that help ensure that basic RBAC bootstrap roles are at least present, even if they aren't correct.

@nikhiljindal since you were looking at the federation controller manager
@sttts since we're looking at trying out RBAC on these.
2016-12-05 11:08:47 -08:00
Kubernetes Submit Queue 45327221a4 Merge pull request #36538 from liggitt/bootstrap-roles
Automatic merge from submit-queue (batch tested with PRs 36352, 36538, 37976, 36374)

Check in YAML versions of bootstrap roles/rolebindings

Allows auditing changes to bootstrap roles over time, preventing accidental changes, and gives a place for people to pull bootstrap roles to load directly
2016-12-05 11:08:44 -08:00
deads2k 2923d09091 remove rbac super user 2016-12-05 13:49:54 -05:00
Kubernetes Submit Queue 5e41d0904f Merge pull request #37830 from sttts/sttts-stratify-cert-generation
Automatic merge from submit-queue

Stratify apiserver cert generation

- move self-signed cert generation to `SecureServingOptions.MaybeDefaultWithSelfSignedCerts`
- make cert generation only depend on `ServerRunOptions`, not on an unfinished `Config` (this breaks the chicken-egg problem of a finished config in https://github.com/kubernetes/kubernetes/pull/35387#pullrequestreview-5368176)
- move loopback client config code into `config_selfclient.go`

Replaces https://github.com/kubernetes/kubernetes/pull/35387#event-833649341 by getting rid of duplicated `Complete`.
2016-12-05 10:15:47 -08:00
Kubernetes Submit Queue 2ac9c08781 Merge pull request #37064 from NickrenREN/vpmtest
Automatic merge from submit-queue

VolumePluginMgrFunc test

Add test func to test VolumePluginMgr funcs in pkg/volume/plugins_test.go
2016-12-05 09:19:06 -08:00
Jordan Liggitt 8553a8b867
Check in YAML versions of bootstrap roles/rolebindings 2016-12-05 12:03:55 -05:00
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
deads2k 5788317953 demonstrate separation of controller intializers 2016-12-05 10:24:45 -05:00
Dr. Stefan Schimanski 3f01c37b9d Update generated files 2016-12-05 16:05:52 +01: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
Dr. Stefan Schimanski d647d0ee8b Make failed secure loopback client non-fatal if insecure port is open 2016-12-05 14:58:16 +01:00
Dr. Stefan Schimanski 5b1d45bc15 Stratify certificate loading and self-sign cert generation
This removes all dependencies on Config during cert generation, only operating
on ServerRunOptions. This way we get rid of the repeated call of Config.Complete
and cleanly stratify the GenericApiServer bootstrapping.
2016-12-05 14:58:15 +01: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
yarntime@163.com 17e91695f9 fix typo 2016-12-05 14:23:07 +08:00
Hongchao Deng 51d9bb1f2b etcd3: have prefix to always prepended 2016-12-04 21:45:07 -08:00
xilabao b95dcfb424 update label filter prompt 2016-12-05 11:03:21 +08:00
Michail Kargakis 267dae6435 controller: requeue replica sets for availability checks 2016-12-05 02:41:15 +01: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
NickrenREN 6a4b671a64 volume pluginsmgr functions test
add function to test vpm functions in pkg/volume/plugins_test.go
2016-12-03 23:02:21 +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
Kubernetes Submit Queue 5698b50258 Merge pull request #37607 from NickrenREN/metricStatfs
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

MetricsStatfs GetMetrics() function test
2016-12-02 23:32:49 -08:00
Kubernetes Submit Queue 67740f5a7d Merge pull request #37320 from ivan4th/remove-stray-quote
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

Remove stray quote from API docs

There was a PR that removed backquote from the line recently, but there's also extra quote.
2016-12-02 23:32:47 -08:00
Kubernetes Submit Queue 39e63e3e53 Merge pull request #37608 from tianshapjq/modify-get-help
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

add some help info about the 'all' arg

**What this PR does / why we need it**:
There is an arg named "all" in the get command, we can use it like "kubectl get all". But we can get nothing about this arg in the help description. Users may not know how to use it without looking into the source code. So here I'm going to add some description about this arg.

**Which issue this PR fixes** 
We discussed about this in 
In pkg/kubectl/cmd/get.go there is a confused arg named "all" [#37533](https://github.com/kubernetes/kubernetes/issues/37533)
2016-12-02 23:32:44 -08:00
Kubernetes Submit Queue cd560926bd Merge pull request #36889 from wojtek-t/reuse_fields_and_labels
Automatic merge from submit-queue

Reuse fields and labels

This should significantly reduce memory allocations in apiserver in large cluster.
Explanation:
- every kubelet is refreshing watch every 5-10 minutes (this generally is not causing relist - it just renews watch)
- that means, in 5000-node cluster, we are issuing ~10 watches per second
- since we don't have "watch heartbets", the watch is issued from previously received resourceVersion
- to make some assumption, let's assume pods are evenly spread across pods, and writes for them are evenly spread - that means, that a given kubelet is interested in 1 per 5000 pod changes
- with that assumption, each watch, has to process 2500 (on average) previous watch events
- for each of such even, we are currently computing fields.

This PR is fixing this problem.
2016-12-02 21:49:43 -08:00
Kubernetes Submit Queue efa42b95a6 Merge pull request #37532 from smarterclayton/remove_export
Automatic merge from submit-queue

Remove ExportOptions from api/internal and use unversioned

Should only have one internal object in use

Part of #37530
2016-12-02 21:11:56 -08:00
Kubernetes Submit Queue 6b05a519a3 Merge pull request #37169 from smarterclayton/approver
Automatic merge from submit-queue (batch tested with PRs 37945, 37498, 37391, 37209, 37169)

Refactor certificate controller to make approval an interface

@mikedanese
2016-12-02 20:32:49 -08:00
Kubernetes Submit Queue aaed3437fb Merge pull request #37209 from NickrenREN/cephfs-test
Automatic merge from submit-queue (batch tested with PRs 37945, 37498, 37391, 37209, 37169)

test cephfs spec construct function
2016-12-02 20:32:48 -08:00
Michael Adam 06ad835e48 glusterfs: implement GID security in the dynamic provisioner
Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-03 05:27:10 +01:00
Humble Chirammal 92167b5be8 glusterfs: teach provisioner to extract gid-range from storage class 2016-12-03 05:27:10 +01:00
Michael Adam 11a5e84aca glusterfs: add MinMaxAllocator
An allocator of integers that allows for changing the range.
Previously allocated numbers are not lost, and can  be
released later even if they have fallen outside of the range.

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-03 05:27:10 +01:00
Kubernetes Submit Queue ef8a8be676 Merge pull request #37990 from kubernetes/Dec/mounttype
Automatic merge from submit-queue (batch tested with PRs 37997, 37939, 37990, 36700, 37258)

Enable containerized mounter only for nfs and glusterfs types

This change is to only enable containerized mounter for nfs and
glusterfs types. For other types such as tmpfs, ext2/3/4 or empty type,
we should still use mount from $PATH to minimize the effect of containerized mounter.
2016-12-02 19:26:49 -08:00
Kubernetes Submit Queue fb7e9d901d Merge pull request #37939 from yarntime/fix_typo_in_node_status_updater
Automatic merge from submit-queue (batch tested with PRs 37997, 37939, 37990, 36700, 37258)

fix typo in node_status_updater

fix typo.
2016-12-02 19:26:47 -08:00
Kubernetes Submit Queue 1b2a4b55bb Merge pull request #36251 from screeley44/k8-immutable-scannotation
Automatic merge from submit-queue

Make pvc storage class annotation immutable after create

Fixes #34516

Added immutable check in validation.go

```
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
# persistentvolumeclaims "gce-claim-storageclass" was not valid:
# * metadata.annotations.volume.beta.kubernetes.io/storage-class: Invalid value: "slow2": field is immutable
#

```
2016-12-02 18:42:32 -08:00
Kubernetes Submit Queue 4bc6e717ed Merge pull request #37357 from gmarek/profilinig
Automatic merge from submit-queue (batch tested with PRs 36263, 36755, 37357, 37222, 37524)

Add flag to enable contention profiling in scheduler.

```release-note
Add flag to enable contention profiling in scheduler.
```
2016-12-02 16:26:47 -08:00
Kubernetes Submit Queue ee3289cce5 Merge pull request #36755 from deads2k/cli-09-extend-impersonate
Automatic merge from submit-queue (batch tested with PRs 36263, 36755, 37357, 37222, 37524)

add other impersonation fields to transport

Adds the group and extra fields to the impersation options in a rest and transport config.

@kubernetes/sig-auth
2016-12-02 16:26:45 -08:00
Jing Xu 37136e9780 Enable containerized mounter only for nfs and glusterfs types
This change is to only enable containerized mounter for nfs and
glusterfs types. For other types such as tmpfs, ext2/3/4 or empty type,
we should still use mount from $PATH
2016-12-02 15:06:24 -08:00
deads2k fc46c31bc2 simplify the authorization attribute getter 2016-12-02 16:19:12 -05:00
juanvallejo 3484c6f676 add resource prefix to multiple items w/ same kind
This patch ensures that a resource prefix is added to multiple items of
the same kind, when using `oc get all`. Before, a prefix was added only
when a single item was returned on `oc get all`, but ignored if only a
single resource kind existed but multiple items for that kind were
returned.
2016-12-02 15:14:44 -05:00
Kubernetes Submit Queue 5e44666fc1 Merge pull request #34945 from nebril/image-manager-tests-cleanup
Automatic merge from submit-queue

Clean up redundant tests in image_manager_test

There was a lot of overlap between parallel and serialized puller tests,
extracted most of these tests internals to separate functions.
2016-12-02 11:40:59 -08:00
Michail Kargakis b8fab92600 kubectl: generated changes for new pdb command 2016-12-02 18:42:25 +01:00
Michail Kargakis 065b652961 kubectl: add create pdb subcommand 2016-12-02 18:42:25 +01:00
Michail Kargakis 86c515ebc3 kubectl: set alias for poddisruptionbudget 2016-12-02 18:39:55 +01:00
Kubernetes Submit Queue 2212c421f6 Merge pull request #37227 from deads2k/api-46-master-client
Automatic merge from submit-queue

switch bootstrap controller to use a client where possible

While looking at https://github.com/kubernetes/kubernetes/issues/37040, I found more places where we can use a normal client instead of a direct to etcd connection.

@wojtek-t you made similar changes in the same controller.
2016-12-02 08:45:07 -08:00
Kubernetes Submit Queue 0a976f5356 Merge pull request #37102 from deads2k/api-45-audit-groups
Automatic merge from submit-queue

add groups to the audit trail

Adds groups to the string that gets put in the audit log.

@soltysh @sttts
2016-12-02 08:45:04 -08:00
Kubernetes Submit Queue 74066816b6 Merge pull request #37098 from deads2k/cli-12-create-cbinding
Automatic merge from submit-queue

add create clusterrolebinding command

Adds `kubectl create clusterrolebinding`.

@kubernetes/sig-cli
2016-12-02 08:44:58 -08:00
Kubernetes Submit Queue b9153dcd4e Merge pull request #37944 from kargakis/eviction-rest-speaks-api-errors
Automatic merge from submit-queue

registry: make Eviction REST speak only api errors

@ymqytw @davidopp
2016-12-02 08:44:56 -08:00
Kubernetes Submit Queue bbd447f555 Merge pull request #34789 from AdoHe/external_service
Automatic merge from submit-queue

create service add create ExternalName service implementation

@kubernetes/kubectl create service add ExternalName support, refer #34731 for more detail.

```release-note
kubectl create service externalname
```
2016-12-02 07:29:06 -08:00
Kubernetes Submit Queue 5960761b9b Merge pull request #36615 from timstclair/cri-attach-tty
Automatic merge from submit-queue

[CRI] Add TTY flag to AttachRequest

Follow up from https://github.com/kubernetes/kubernetes/pull/35661
For https://github.com/kubernetes/kubernetes/issues/29579

- Add TTY to the CRI AttachRequest
- Moves responsibility from the runtime shim to the Kubelet for populating the TTY bool in the request based on the container spec

/cc @euank @feiskyer @kubernetes/sig-node
2016-12-02 07:28:59 -08:00