Commit Graph

686 Commits

Author SHA1 Message Date
Kubernetes Publisher 40c151d7ae Merge pull request #51109 from kubernetes/revert-50531-gRPC-keep-alive-godeps
Automatic merge from submit-queue

Revert "Updated gRPC vendoring to support Keep Alive"

Reverts kubernetes/kubernetes#50531

Ref - https://github.com/kubernetes/kubernetes/issues/51099

/cc @wojtek-t @RenaudWasTaken

Kubernetes-commit: b0ad3a1c5d56c9129ea389fe7456dfe75be4ce72
2017-08-29 13:17:58 +00:00
Shyam JVS 30e69a7570 Revert "Updated gRPC vendoring to support Keep Alive"
Kubernetes-commit: 3b014e103b2dc3fca76847ddf852a1dfd8a2be99
2017-08-29 13:17:14 +00:00
Kubernetes Publisher 50fa2f224d sync: reset Godeps/Godeps.json 2017-08-29 13:17:14 +00:00
Kubernetes Publisher b3980c29c0 Merge pull request #50893 from CaoShuFeng/fuzzer
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

[advanced audit api] fuzz Event with random value

This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts
@ericchiang is also researching this.

**Release note**:
```
NONE
```

Kubernetes-commit: c13e9d14cde09e97cebd5883d04443d22cc91ca1
2017-08-29 13:17:13 +00:00
Kubernetes Publisher 998e4f134a Merge pull request #50531 from NVIDIA/gRPC-keep-alive-godeps
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

Updated gRPC vendoring to support Keep Alive

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

This PR bumps the version of the vendored version of gRPC from v1.0.4 to v1.5.1
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Special notes for your reviewer**:
@vishh @jiayingz

**Release note**:
```
Bumped gRPC from v1.0.4 to v1.5.1
```

Kubernetes-commit: 967c19df4916160d4d4fbd9a65bad41a53992de8
2017-08-29 13:17:13 +00:00
Cao Shufeng d7bd79fee1 [advanced audit api] fuzz Event with random value
This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts @ericchiang

Kubernetes-commit: f2ec610455f3756afebfcbd99c108abc86a5015d
2017-08-29 13:17:13 +00:00
Kubernetes Publisher cd67d54b19 Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?

Kubernetes-commit: b59ad9cbfff866093a6c0ee26c3562e9ec9133e4
2017-08-29 13:16:17 +00:00
Renaud Gaubert cae6b9779a Updated gRPC version to support Keep Alive
Kubernetes-commit: faee6d6d5d0bf6d753a60c1338c6fbf17a2d956d
2017-08-29 13:16:17 +00:00
Kubernetes Publisher 6d1b3fd31d sync: reset Godeps/Godeps.json 2017-08-29 13:16:17 +00:00
gmarek 0a67bd6be4 Make metav1.(Micro)?Time functions take pointers
Kubernetes-commit: 0504cfbc2556155c31e5db43673d6b903c64dfa2
2017-08-29 13:16:16 +00:00
Kubernetes Publisher 30eccf60f1 Merge pull request #50876 from enj/enj/f/owners_reviewer
Automatic merge from submit-queue

Add enj as reviewer to OWNERS

Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

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

**Release note**:

```release-note
NONE
```

@kubernetes/sig-api-machinery-pr-reviews
@kubernetes/sig-auth-pr-reviews

Kubernetes-commit: afabd09889d53ade30f1ce5b39b33ebe40f0a52f
2017-08-18 05:42:07 -07:00
Monis Khan 504f70acec Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

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

Kubernetes-commit: dd06794bc20ef1e0889af576c7a4f7a2f607e49d
2017-08-29 13:16:16 +00:00
Kubernetes Publisher ee9a3737cf Merge pull request #48263 from CaoShuFeng/useless_argument
Automatic merge from submit-queue

remove useless argument "name"

**Release note**:

```
NONE
```

Kubernetes-commit: c3a39f763e374101c681f62f7cd875ea70f50c03
2017-08-18 05:41:45 -07:00
Cao Shufeng 81eb3429e7 remove useless argument "name"
Kubernetes-commit: 2e97611bc62b88c48777d6209a0ed28d17d0e52d
2017-08-29 13:16:16 +00:00
Kubernetes Publisher edb9f8d8fd Merge pull request #50885 from CaoShuFeng/webhook_dead_code
Automatic merge from submit-queue (batch tested with PRs 50255, 50885)

remove dead code for cloner

I found some dead code in audit webhook backend.
This change do some clean work for: 2bbe72d4e0

**Release note**:
```
NONE
```

Kubernetes-commit: 2ba796fe47b3d17c5a385183d91a396aee580b87
2017-08-29 13:16:15 +00:00
Cao Shufeng cbc6b83455 remove dead code for cloner
I found some dead code in audit webhook backend.
This change do some clean work for: 2bbe72d4e0

Kubernetes-commit: 7b5c7bb711e7f15a1bf216a7a51fd40148110fba
2017-08-29 13:16:15 +00:00
Kubernetes Publisher c883b7cc93 Merge pull request #49617 from duan-yue/code_cls
Automatic merge from submit-queue

fix typo

**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
NONE
```

Kubernetes-commit: 38053c3e4486e6a7fafd00b2784a1e67e0357f45
2017-08-17 23:21:20 -07:00
Kubernetes Publisher 174f5f29a9 Merge pull request #50852 from guangxuli/fix_apiserver_register
Automatic merge from submit-queue (batch tested with PRs 50281, 50747, 50347, 50834, 50852)

fix incorrect logic in admission register

**What this PR does / why we need it**:
There is no issue for this PR, just fix incorrect logic in invocation `func (ps *Plugins) Register(name string, plugin Factory) ` after browsing the code accidentally.  And apparently, the logic exits potential panic.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
no issue
**Special notes for your reviewer**:
none
**Release note**:
none

Kubernetes-commit: 1eb04f6a2a16b3b8642184db62719451c3e84d2a
2017-08-29 13:16:15 +00:00
duan-yue e89debc597 fix typo
Kubernetes-commit: 2ad04cb46dfa84fbd3b169f555ee0ed71b277428
2017-08-29 13:16:15 +00:00
guangxuli 768926168b fix incorrect logic
Kubernetes-commit: d4b41afe59736e63c0f5388256324c2583d7a659
2017-08-29 13:16:14 +00:00
Kubernetes Publisher e6d18566b8 Merge pull request #50387 from jcbsmpsn/metric-certificate-expiration
Automatic merge from submit-queue

Add metric for remaining lifetime of certificates authenticating requests

fixes #50778

When incoming requests to the API server are authenticated by a certificate, the expiration of the certificate can affect the validity of the authentication. With auto rotation of certificates, which is starting with kubelet certificates, the goal is to use shorter lifetimes and let the kubelet renew the certificate as desired. Monitoring certificates which are approaching expiration and not renewing would be an early warning sign that nodes are about to stop participating in the cluster.

**Release note**:

```release-note
Add new Prometheus metric that monitors the remaining lifetime of certificates used to authenticate requests to the API server.
```

Kubernetes-commit: 6bc0b295b59d85ffbd1ee2044d6eb2e2277d5d21
2017-08-16 10:19:22 -07:00
Kubernetes Publisher 2321c45a71 Merge pull request #49115 from CaoShuFeng/audit_beta
Automatic merge from submit-queue (batch tested with PRs 49115, 47480)

Upgrade advanced audit to version v1beta1

This change does nothing but only upgrades advanced audit to version v1beta1.
There will be following up changes which does real effect to advanced audit feature.

After this change audit policy file should contain apiVersion and kind and has such format:
```
apiVersion: audit.k8s.io/v1alpha1
kind: Policy
rules:
  - level: None
```
or use the v1beta1 policy:
```
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
  - level: None
```
Updates #48561

**Release note**:

```
Upgrade advanced audit to version v1beta1.
```

Kubernetes-commit: 49bee177b22f331c11860b227b5cc7f9ff9ec07c
2017-08-29 13:16:14 +00:00
Jacob Simpson 68a92a4526 Add metric for remaining life of authenticating certificates
When incoming requests to the API server are authenticated by a
certificate, the expiration of the certificate can affect the validity
of the authentication. With auto rotation of certificates, which is
starting with kubelet certificates, the goal is to use shorter lifetimes
and let the kubelet renew the certificate as desired. Monitoring
certificates which are approaching expiration and not renewing would be
an early warning sign that nodes are about to stop participating in the
cluster.

Kubernetes-commit: 49a19c6011e05363a8baf8e99c917d11a9496568
2017-08-29 13:16:14 +00:00
Kubernetes Publisher 4176c80429 Merge pull request #50681 from sttts/sttts-deepcopy-calls-apiserver
Automatic merge from submit-queue

apiserver: simplify deepcopy calls

Kubernetes-commit: 2d5624bb2c36e1918afd5d953275c5fae7e1ffd3
2017-08-29 13:16:13 +00:00
Dr. Stefan Schimanski 24a3b34c79 audit: disable new v1beta1 types until incompatible changes are done
Kubernetes-commit: 1dc251a1604b1576258f123ac8dd8390bba2e4a9
2017-08-29 13:16:13 +00:00
Dr. Stefan Schimanski 1e4465a8e7 apiserver: simplify deepcopy calls
Kubernetes-commit: b2442224e79f480409806c2ccfa24a9acb708162
2017-08-29 13:16:13 +00:00
Cao Shufeng 24b54db39e run hack/update-all.sh
Kubernetes-commit: 0410221c3fec1a54cde05104b92e44e13cddc77a
2017-08-29 13:16:13 +00:00
Cao Shufeng 3468d049a7 upgrade advanced audit to v1beta1
Kubernetes-commit: f4e8b8f1464e588306d5c1c4ffdc1a6cb1e9313b
2017-08-29 13:16:13 +00:00
Kubernetes Publisher f05a9d559d Merge pull request #50577 from crassirostris/audit-graceful-shotdown
Automatic merge from submit-queue

advanced audit: shutdown batching audit webhook gracefully

Follow-up of https://github.com/kubernetes/kubernetes/pull/50439

When the `stopCh` passed to the batching audit webhook is closed, it stops accepting new events and when `Shutdown` method is called afterwards, it blocks until the last request to the webhook has finished.

/cc @tallclair @soltysh

Kubernetes-commit: 3211d4dde6c46856d896f09013717313a880cc0c
2017-08-15 06:54:57 -07:00
Mik Vyatskov 04aa1e08ec Implement batching audit webhook graceful shutdown
Kubernetes-commit: 7798d32fc787d79da617914259d9285e558054f7
2017-08-29 13:16:12 +00:00
Kubernetes Publisher c6c24c1113 Merge pull request #50638 from nikhita/feature-gates-doc
Automatic merge from submit-queue

FeatureGate: update comments

The godoc - https://godoc.org/k8s.io/apiserver/pkg/util/feature - does not contain descriptions of the functions. This PR adds them.

**Release note**:

```release-note
NONE
```

/cc @sttts

Kubernetes-commit: 1268c1a1e0220b52bf345f97007ed61dc7969caf
2017-08-15 03:58:23 -07:00
Nikhita Raghunath 9edc635fcc FeatureGate: update comments
Kubernetes-commit: fea5a8bc8a7ef2f956d2b11cb54248ec9545ef15
2017-08-29 13:16:12 +00:00
Kubernetes Publisher 5278faea71 Merge pull request #50439 from sttts/sttts-shutdown-apiservers
Automatic merge from submit-queue

apiservers: add synchronous shutdown mechanism on SIGTERM+INT

This is used to shutdown the auditing backend in order not to drop any pending events on the floor.

Kubernetes-commit: 4d6db7466c6fe79f502ba7efd55e605542849060
2017-08-15 02:27:06 -07:00
Kubernetes Publisher 10e9a53d92 Merge pull request #50553 from m1093782566/fed-kube-apiserver
Automatic merge from submit-queue (batch tested with PRs 49129, 50436, 50417, 50553, 47587)

add validation for fed-apiserver and apiserver run options

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

Add validation for fed-apiserver and apiserver run options

**Which issue this PR fixes**

fixes #50552

**Special notes for your reviewer**:

This is a follow-up of #50135

**Release note**:

```release-note
NONE
```

Kubernetes-commit: f9c861aa101b16a09dd10def70756dbb0b054868
2017-08-29 13:16:11 +00:00
Dr. Stefan Schimanski 86ef841256 apiservers: add synchronous shutdown mechanism on SIGTERM+INT
Kubernetes-commit: 11b25366bc7bfe2ad273c8bf9c332fd9d233bffc
2017-08-29 13:16:11 +00:00
Kubernetes Publisher e82277a8ca Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

Replacing #50093.

Kubernetes-commit: 9f902fef246851c11e4d17c9597853a6156688a4
2017-08-29 13:16:11 +00:00
m1093782566 7313c11a9e add validation for fed-apiserver
Kubernetes-commit: f2ea31fd925f764f8c684710d9cd345663e88d17
2017-08-29 13:16:11 +00:00
Dr. Stefan Schimanski 2384086d1e apimachinery: remove misleading NewDefaultRESTMapper
Kubernetes-commit: 87c9f89cb15b2a64271dbdd292e2ce4abe7ab84a
2017-08-29 13:16:11 +00:00
Kubernetes Publisher 521652b00c Merge pull request #49785 from FengyunPan/fix-getPortByIP
Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618)

Fix conflict about getPortByIp

**What this PR does / why we need it**:
Currently getPortByIp() get port of instance only based on IP.
If there are two instances in diffent network and the CIDR of
their subnet are same, getPortByIp() will be conflict.
My PR gets port based on IP and Name of instance.

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

**Special notes for your reviewer**:

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

Kubernetes-commit: a7ce691311f5462cf71d79a1f9431605198803af
2017-08-29 13:16:10 +00:00
Dr. Stefan Schimanski 2c8f1ce1d5 apimachinery: remove pre-apigroups import prefix logic
Kubernetes-commit: 8728576236698083f619c4fab06943b174f3fc61
2017-08-29 13:16:10 +00:00
FengyunPan 31e72764d7 Update gophercloud to support list interfaces of OpenStack instance
Kubernetes-commit: ba463062ca363bc6626dff80172782a43abe033f
2017-08-29 13:15:25 +00:00
Kubernetes Publisher 3c35b1a9b8 sync: reset Godeps/Godeps.json 2017-08-29 13:15:25 +00:00
Kubernetes Publisher 0ba7a639f7 Merge pull request #50258 from liggitt/token-cache
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Enable caching successful token authentication

Resolves #50472

To support revocation of service account tokens, an etcd lookup of the token and service account is done by the token authenticator. Controllers that make dozens or hundreds of API calls per second (like the endpoints controller) cause this lookup to be done very frequently on the same objects.

This PR:
* Implements a cached token authenticator that conforms to the authenticator.Token interface
* Implements a union token authenticator (same approach as the union request authenticator, conforming to the authenticator.Token interface)
* Cleans up the auth chain construction to group all token authenticators (means we only do bearer and websocket header parsing once)
* Adds a 10-second TTL cache to successful token authentication

```release-note
API server authentication now caches successful bearer token authentication results for a few seconds.
```

Kubernetes-commit: 42adb9ef2572d7ac30237a3aad47ead75ff7c6cc
2017-08-11 14:14:06 -07:00
Kubernetes Publisher 9903cc5d7a Merge pull request #50407 from ixdy/gazelle-and-kazel
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Manage BUILD files using gazelle + kazel

**What this PR does / why we need it**: uses the upstream `gazelle` tool to manage go rules in BUILD files.
This is needed to support Bazel builds on Mac OS and Bazel cross compilation in general.

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

**Special notes for your reviewer**:
It's probably easiest to review this commit-by-commit:
* bump to latest `rules_go` (for recent `cgo_library` and `gazelle` improvements)
* update `kazel` with recent compatibility fixes (https://github.com/kubernetes/repo-infra/pull/28, https://github.com/kubernetes/repo-infra/pull/27), update `hack` scripts to download/build `gazelle`, and then run both `gazelle` and `kazel`. (Additionally make `gazelle` skip things it shouldn't touch.)
* run `hack/update-bazel.sh` to autogenerate everything
* remove the old `cgo_genrule` rules - these are now part of `go_library`
* remove the `automanaged` tags from all go rules - `gazelle` doesn't use them, and it prevents an old version of `kazel/gazel` from messing with the rules
* remove the `licenses()` rules from everywhere but `third_party/` - we don't need them, and `gazelle` won't add them on new `BUILD` files it generates.

**Release note**:

```release-note
NONE
```
for review:
/assign @mikedanese @spxtr
for approval:
/assign @thockin

Kubernetes-commit: 941ad0164d44cfcf96dd6efbb491e2222a3a23d3
2017-08-29 13:15:24 +00:00
Jordan Liggitt be8f046a0c Add union token authenticator
Kubernetes-commit: 4fd8196cf56aa7884f5a385017b2be651a259e59
2017-08-29 13:15:24 +00:00
Jeff Grafton 6c539a43c6 Use buildozer to delete licenses() rules except under third_party/
Kubernetes-commit: a7f49c906df816123e7d4ccbd4cebab411519465
2017-08-29 13:15:24 +00:00
Jordan Liggitt 80d2e2dae5 Add token cache component
Kubernetes-commit: 1670ba58d5425caecbde8871b07521e9e5888f78
2017-08-29 13:15:24 +00:00
Jeff Grafton 6caa2933ae Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 13:15:24 +00:00
Jordan Liggitt dcfd8acc4d Add token group adder component
Kubernetes-commit: 15d8509a711efa062a1357cf1cfb398ec6e91023
2017-08-29 13:15:24 +00:00
Kubernetes Publisher e4976b3176 Merge pull request #50308 from m1093782566/validate-apiserver
Automatic merge from submit-queue

validate kube-apiserver options

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

Create Validate() or add more checks in existing Validate() for the following files:

* vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go:80

* vendor/k8s.io/kube-aggregator/pkg/cmd/server/start.go:104

* vendor/k8s.io/sample-apiserver/pkg/cmd/server/start.go:82

* cmd/kube-apiserver/app/options/validation.go:49

**Which issue this PR fixes**:

fixes #50301

**Special notes for your reviewer**:

This PR follows #50135

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 984f1af5c55b55f1cbbefbe7afd8f3731f06dcd2
2017-08-29 13:15:23 +00:00