Commit Graph

1747 Commits (7c31be8ec4e748562e85b49182afd8549feed9e2)

Author SHA1 Message Date
Kubernetes Submit Queue 7be28a15cc Merge pull request #47665 from ironcladlou/gc-poll-types
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Enable garbage collection of custom resources

Enhance the garbage collector to periodically refresh the resources it monitors (via discovery) to enable custom resource definition GC (addressing #44507 and reverting #47432).

This is a replacement for #46000.

/cc @lavalamp @deads2k @sttts @caesarxuchao 

/ref https://github.com/kubernetes/kubernetes/pull/48065

```release-note
The garbage collector now supports custom APIs added via CustomeResourceDefinition or aggregated apiservers. Note that the garbage collector controller refreshes periodically, so there is a latency between when the API is added and when the garbage collector starts to manage it.
```
2017-07-29 05:28:53 -07:00
Kubernetes Submit Queue 740ca9a052 Merge pull request #49538 from supereagle/versioned-coreclient
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Use the core client with version

**What this PR does / why we need it**:
Replace the **deprecated** `clientSet.Core()` with `clientSet.CoreV1()`.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-07-29 05:28:49 -07:00
Kubernetes Submit Queue 0f6a64453c Merge pull request #49688 from wojtek-t/skip_cacher_if_not_initialized
Automatic merge from submit-queue (batch tested with PRs 49581, 49652, 49681, 49688, 44655)

Don't use cacher if uninitialized

Ref #49684
2017-07-28 13:45:51 -07:00
Kubernetes Submit Queue b341939d6d Merge pull request #49400 from caesarxuchao/add-OWNERS
Automatic merge from submit-queue

copy OWNERS to k8s.io/api

`staging/src/k8s.io/api/OWNERS` is combination of `pkg/api/OWNERS` and `pkg/apis/OWNERS`. Other `OWNERS` files are copied from `pkg/apis/<group_name>/OWNERS`.

Since this PR is essentially copying files, so we don't need approval from everyone listed in the OWNERS.
2017-07-28 11:50:35 -07:00
Kubernetes Submit Queue 537ced9a1d Merge pull request #49778 from resouer/fix-nil
Automatic merge from submit-queue

Fix crd delete nil pointer in example

**What this PR does / why we need it**:
When error is `IsAlreadyExists`, crd will be nil, then `defer` statement will `nil pointer`.

**Release note**:

```release-note
NONE
```
2017-07-28 11:50:13 -07:00
Kubernetes Submit Queue 3cd5beceb4 Merge pull request #49117 from shyamjvs/add-size-metrics-to-apiserver
Automatic merge from submit-queue

Add apiserver metric for response sizes

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

This should help us understand GET/LIST call latencies better. It'll also help catch differences in object sizes across kubemark and real cluster.
I'm labelling the metrics by namespace (hoping that there won't be toooo many of them).

/cc @smarterclayton @gmarek 
cc @kubernetes/sig-scalability-misc @kubernetes/sig-api-machinery-misc @lavalamp @wojtek-t
2017-07-28 11:50:00 -07:00
Kubernetes Submit Queue c06e8f03d9 Merge pull request #49694 from huangjiuyuan/fix-selector-test
Automatic merge from submit-queue (batch tested with PRs 49712, 49694, 49714, 49670, 49717)

fix arg type error in printf

**What this PR does / why we need it**:
A value of wrong type is passed as arg to a `Errorf` in `vendor/k8s.io/apimachinery/pkg/fields/selector_test.go`, This PR fixes this problem.

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

`NONE`
2017-07-28 08:15:02 -07:00
Dan Mace d08dfb92c7 Enable garbage collection of custom resources
Enhance the garbage collector to periodically refresh the resources it
monitors (via discovery) to enable custom resource definition GC.

This implementation caches Unstructured structs for any kinds not
covered by a shared informer. The existing meta-only codec only supports
compiled types; an improved codec which supports arbitrary types could
be introduced to optimize caching to store only metadata for all
non-informer types.
2017-07-28 10:00:10 -04:00
Harry Zhang 66a2ee5a61 Fix crd delete nil pointer 2017-07-28 21:12:52 +08:00
Kubernetes Submit Queue e87f809da0 Merge pull request #49219 from jmillikin-stripe/case-insensitive-request-header-group
Automatic merge from submit-queue (batch tested with PRs 49081, 49318, 49219, 48989, 48486)

Use case-insensitive header keys for `--requestheader-group-headers`.

This flag is documented as being case-insensitive, but the code was
doing a case-sensitive map lookup.

**Release note**:
```release-note
Bug fix: Parsing of `--requestheader-group-headers` in requests should be case-insensitive.
```
2017-07-28 04:03:40 -07:00
Kubernetes Submit Queue 44b0eeed13 Merge pull request #48907 from thomastaylor312/bump_oidc_dep
Automatic merge from submit-queue (batch tested with PRs 47738, 49196, 48907, 48533, 48822)

Bumps go-oidc version to include fix for jwt header parsing

**What this PR does / why we need it**:
This bumps the go-oidc dependency to use a fix merged in https://github.com/coreos/go-oidc/pull/153 for OIDC providers that don't set an `Expires` header

**Which issue this PR fixes** : 
Partially addresses #42654 
Also related: https://github.com/coreos/go-oidc/issues/136

**Special notes for your reviewer**:
None

**Release note**:
```release-note
NONE
```
2017-07-28 03:10:32 -07:00
Kubernetes Submit Queue 85f19ec6e9 Merge pull request #47738 from php-coder/code_simplification
Automatic merge from submit-queue (batch tested with PRs 47738, 49196, 48907, 48533, 48822)

ParseEncryptionConfiguration: simplify code

**What this PR does / why we need it**:
Reorder `if`-s to make code a bit more readable. It also improves godoc comment and error message.

**Release note**:
```release-note
NONE
```

PTAL @sakshamsharma
2017-07-28 03:10:29 -07:00
Kubernetes Submit Queue 829526079d Merge pull request #48905 from p0lyn0mial/sample_server_admission_initializer
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

adds an admission plugin initializer to the sample apiserver.

**What this PR does / why we need it**:
this PR adds an admission plugin initializer to the sample apiserver.
the plugin initializer is going to be used by an admission plugin
that will use generated informers/listers to list the cluster-scoped resources.

#47868

**Release note**:

```
NONE
```
2017-07-28 02:13:04 -07:00
Kubernetes Submit Queue 7056b5ba70 Merge pull request #49238 from janetkuo/apps-v1beta2-rs
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

Add apps/v1beta2.ReplicaSet

~Depends on #48746~ (merged)
~Depends on #49357~ (merged)
xref: #49135

```release-note
Add a new API object apps/v1beta2.ReplicaSet
```
2017-07-28 02:12:51 -07:00
Wojciech Tyczynski 74b9ba3b4d Don't use cacher if uninitialized 2017-07-28 08:12:48 +02:00
Kubernetes Submit Queue 270206e9c3 Merge pull request #49736 from caesarxuchao/fix-link
Automatic merge from submit-queue

Update the link to client-gen doc

The doc itself also needs update, i'll create an issue.
2017-07-27 22:03:35 -07:00
Kubernetes Submit Queue 803cb9303b Merge pull request #49495 from deads2k/controller-12-toleration
Automatic merge from submit-queue (batch tested with PRs 49665, 49689, 49495, 49146, 48934)

make it possible to allow discovery errors for controllers

Update the discovery client to return partial discovery information *and* an error.  Since we can aggregate API servers, discovery of some resources can fail independently.  Callers of this function who want to tolerate the errors can, existing callers will still get an error and fail in normal blocks.

@kubernetes/sig-api-machinery-misc @sttts
2017-07-27 21:45:34 -07:00
Chao Xu 5fb7bbc9f3 update the link to client-gen doc 2017-07-27 16:54:10 -07:00
Shyam Jeedigunta 5facb62806 Add apiserver metric for response sizes split by namespace scope 2017-07-27 14:12:01 +02:00
huangjiuyuan 61b1d52099 fix arg type error in printf 2017-07-27 16:00:38 +08:00
deads2k b7286f3188 make it possible to allow discovery errors for controllers 2017-07-26 16:09:30 -04:00
Kubernetes Submit Queue 36f8ba587d Merge pull request #49576 from sttts/sttts-table-deepcopy
Automatic merge from submit-queue (batch tested with PRs 48360, 48469, 49576, 49516, 49558)

apimachinery: fix meta/v1alpha1.Table deepcopy
2017-07-26 13:02:41 -07:00
Kubernetes Submit Queue 112c401b10 Merge pull request #49572 from timothysc/etcd_3_1_10_client
Automatic merge from submit-queue (batch tested with PRs 47357, 49514, 49271, 49572, 49476)

Updates etcd-client to 3.1.10

I have no idea why azure sdk update became transitive but godeps we're restored before update

Fixes: https://github.com/kubernetes/kubernetes/issues/49386
xref: https://github.com/kubernetes/kubernetes/pull/49393

```
NONE
```

/cc @kubernetes/sig-scalability-pr-reviews @kubernetes/sig-api-machinery-misc @hongchaodeng @wojtek-t
2017-07-26 12:03:50 -07:00
Janet Kuo ac3f9b8c34 Autogen 2017-07-26 10:56:55 -07:00
p0lyn0mial d47d451651 adds an admission plugin initializer to the sample apiserver.
the plugin initializer is going to be used by an admission plugin
that will use generated informers/listers to list the cluster-scoped resources.
2017-07-26 19:55:44 +02:00
Janet Kuo 6eaf6884fb Bump ReplicaSet to apps/v1beta2 2017-07-26 09:51:41 -07:00
supereagle edce96c5b6 use the core client with version 2017-07-26 19:16:02 +08:00
Kubernetes Submit Queue 4399fb2b87 Merge pull request #49071 from foxish/foxish-api
Automatic merge from submit-queue (batch tested with PRs 43443, 46193, 49071, 47252)

Add v1beta2.DaemonSet

Depends on https://github.com/kubernetes/kubernetes/pull/48746
Partly implements https://github.com/kubernetes/kubernetes/issues/49135

```release-note
Adding type apps/v1beta2.DaemonSet
```
2017-07-25 21:52:50 -07:00
Kubernetes Submit Queue 531be15bfe Merge pull request #49350 from sakshamsharma/envelope
Automatic merge from submit-queue (batch tested with PRs 49259, 49350)

Add envelope encryption transformer

Essential to implement envelope encryption, using a KEK-DEK based encryption scheme which uses an external root of trust (cloudkms, hardware etc).

* Caches known DEKs.
* Creates a new DEK for each write (most common and recommended way of implementing envelope encryption).
* Relies on an implementation of `envelope.Service` which actually implements the encryption and decryption using the external root of trust.

Essential for #48522

@smarterclayton @jcbsmpsn @cheftako @lavalamp @php-coder @destijl @cjcullen 

This PR is generic, and independent of any cloudprovider / cloud / KMS code.
For more context: #48574
2017-07-25 20:01:29 -07:00
Kubernetes Submit Queue 778da50811 Merge pull request #49259 from dixudx/fix_jsonpatch_nil_value_merge
Automatic merge from submit-queue (batch tested with PRs 49259, 49350)

update json-patch to fix nil value issue when creating mergepatch

**What this PR does / why we need it**:
When [creating a patch for merge](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/annotate.go#L255), nil value will be considered as different value. This has been fixed and merged in [evanphx/json-patch #45](https://github.com/evanphx/json-patch/pull/45).

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

**Special notes for your reviewer**:
/cc @MikeSpreitzer @mengqiy 

**Release note**:

```release-note
Fix nil value issue when creating json patch for merge
```
2017-07-25 20:01:27 -07:00
Timothy St. Clair a8b2146ef3 Updates godep for etcd-client to 3.1.10. 2017-07-25 16:14:22 -05:00
Anirudh c168a3faeb DS: autogen 2017-07-25 13:33:25 -07:00
Anirudh c7a25a3786 DS: Api Machinery Fixes 2017-07-25 13:33:21 -07:00
Kubernetes Submit Queue 636984dcdd Merge pull request #49474 from sttts/sttts-roundtrip-deepcopy
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

apimachinery: fail early with deepcopy problems during roundtrip tests

If deepcopy is broken for some type, it's easy to diagnose. This PR let's the roundtrip test to fail early in this case.
2017-07-25 12:14:41 -07:00
foxish 14d5793869 DS: changes to server and storage 2017-07-25 11:47:57 -07:00
foxish f221d447d1 DS: add to v1beta2/types.go 2017-07-25 11:47:57 -07:00
Kubernetes Submit Queue a25a51cc0f Merge pull request #45946 from atlassian/expose-informer-constructors
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

Expose informer constructors

**What this PR does / why we need it**:
See #45939

**Which issue this PR fixes**
Fixes #45939

**Release note**:

```release-note
NONE
```
2017-07-25 11:06:51 -07:00
Kubernetes Submit Queue 393b1228c9 Merge pull request #45431 from DirectXMan12/feature/fake-dynamic-client
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

[client-go] Fake Dynamic Client

This commit converts `"k8s.io/client-go/dynamic".Client` to an interface, and implements fake versions of both `ClientPool` and `Client`.  This allows components which make uses of these clients to be tested in the same way that clientset-based components can be tested, using the standard `testing.Fake` machinery.

**Release note**:
```release-note
NONE
```
2017-07-25 11:06:49 -07:00
Kubernetes Submit Queue 9c3d0e8a96 Merge pull request #48224 from deads2k/controller-11-reflectormetrics
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

add reflector metrics

This adds metrics (optionally prometheus) to reflectors so that you can see when one reflector is behaving poorly and just how poorly its doing.

@eparis 

```release-note
Adds metrics for checking reflector health.
```
2017-07-25 11:06:47 -07:00
Dr. Stefan Schimanski e03a5338a2 apimachinery: fix meta/v1alpha1.Table deepcopy 2017-07-25 19:03:44 +02:00
John Millikin 0acdc0cdb3
Use case-insensitive header keys for `--requestheader-group-headers`.
This flag is documented as being case-insensitive, but the code was
doing a case-sensitive map lookup.
2017-07-25 09:24:16 -07:00
Kubernetes Submit Queue 9bdf464bd5 Merge pull request #49286 from kargakis/remote-myself-from-some-places
Automatic merge from submit-queue (batch tested with PRs 49286, 49550)

Remove myself from a bunch of places

I am assigned in reviews which I never get to do. I prefer drive-bys whenever I can do them rather than the bot choosing myself in random, ends up being mere spam.

@smarterclayton please approve.
2017-07-25 06:41:08 -07:00
deads2k 151d39682e add reflector metrics 2017-07-25 09:01:37 -04:00
Kubernetes Submit Queue cce1c9b41e Merge pull request #49192 from mfojtik/unify-clientgen-tags
Automatic merge from submit-queue (batch tested with PRs 49498, 49192)

Unify genclient tags and add more fine control on verbs generated

This will change the syntax of the existing `genclient` tags be like this:

```
// +genclient
// +genclient:noStatus
// +genclient:noVerbs
// +genclient:nonNamespaced
// +genclient:readonly
```

The first one indicates the client will be generated from the struct below and the other tags are basically options to the genclient (which justify why they should be prefixed with `genclient:`)

This also changes the `// +genclientstatus=false` to `// +genclient:noStatus` to follow the pattern and also changes the `// +noMethods=true` to `// +genclient:noVerbs` as we call the REST operations verbs so it will make it consistent with terminology.

In addition to existing options this patch also add two more to allow more fine-grained control on which verbs are going to be generated. This is extra useful for third-party projects (like OpenShift) where some resources does not implement full CRUD, but for example just "create" verb or "create" and "delete"...
To support that, you can use this syntax:

```
// +genclient:onlyVerbs=create,delete
// +genclient:skipVerbs=patch
```

The first one will generate only create and delete functions and second one will generate full CRUD without "patch" actions. This somehow overlaps with the existing "readonly" tag, but I want to keep that tag in place as it reads better in some cases ;-)
2017-07-25 02:43:13 -07:00
Kubernetes Submit Queue 7f1d9382ec Merge pull request #48846 from dashpole/remove_ood
Automatic merge from submit-queue

Remove flags low-diskspace-threshold-mb and outofdisk-transition-frequency

issue: #48843

This removes two flags replaced by the eviction manager.  These have been depreciated for two releases, which I believe correctly follows the kubernetes depreciation guidelines.

```release-note
Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard
```

cc @mtaufen since I am changing kubelet flags
cc @vishh @derekwaynecarr 
/sig node
2017-07-24 23:05:50 -07:00
Kubernetes Submit Queue 72494353c9 Merge pull request #49357 from mbohlool/opid_fix
Automatic merge from submit-queue

Fix Operation names for subresources

Subresources may have their kind but in operationID and description we should use their parent kind not their own kind. The subresource name represents subresources and no need to repeat in with their kind. e.g. `Scale` has kind of `Scale` and subresource name of `Scale`. This creates names like `read scale of the specified Scale` or `readCoreV1NamespacedScaleScale` for scale on replication controller. This PR fixes description and operation ID for them to `read scale of the specified ReplicationController` and `readCoreV1NamespacedReplicationControllerScale`.

@caesarxuchao I would like this to be patched in 1.7 too as it is useful for all clients and there is no need to wait for 1.8 for this documentation fix.

```release-note
Fixed OpenAPI Description and Nickname of API objects with subresources
```

fixes #49250
2017-07-24 22:12:24 -07:00
Di Xu 8447cee0e0 update json-patch to fix nil value issue when creating mergepatch 2017-07-25 12:56:49 +08:00
Kubernetes Submit Queue 7e5fd72aa6 Merge pull request #49251 from enisoc/initialized-annotation
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

StatefulSet: Remove `pod.alpha.kubernetes.io/initialized` annotation.

The `pod.alpha.kubernetes.io/initialized` annotation was originally a tool for validating StatefulSet's ordered Pod creation guarantees during the feature's alpha phase.

If set to "false" on a given Pod, it would interrupt StatefulSet's normal behavior. In v1.5.0, the annotation was deprecated and the default became "true" as part of StatefulSet's graduation to beta.

The annotation is now ignored, meaning it cannot be used to interrupt StatefulSet Pod management.

```release-note
StatefulSet: The deprecated `pod.alpha.kubernetes.io/initialized` annotation for interrupting StatefulSet Pod management is now ignored. If you were setting it to `true` or leaving it unset, no action is required. However, if you were setting it to `false`, be aware that previously-dormant StatefulSets may become active after upgrading.
```

ref #41605
2017-07-24 19:30:37 -07:00
Mikhail Mazurskiy 37f909a274
Re-generate informers 2017-07-25 12:19:18 +10:00
Mikhail Mazurskiy 7927fdf856
Expose Informer constructors 2017-07-25 12:15:21 +10:00