Commit Graph

3530 Commits (ba535d57f6e2eb338f6fbf121d6be2e6f9204136)

Author SHA1 Message Date
Kubernetes Submit Queue fd3cbc9bbf
Merge pull request #60995 from caesarxuchao/webhook-serializer
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Let webhook controller uses a local scheme that understand admissionReview

An alternative to #60965.
Fix #60963.
Fix kubernetes/sample-apiserver#21.

Created a scheme that only understands admission/v1beta1 and use it to
encode/decode admissionReviews.

cc @sttts
2018-03-12 07:02:27 -07:00
Chao Xu 3ab516035d Make admission webhooks work in custom apiservers.
Created a scheme that only understands admission/v1beta1 and use it to
encode/decode admissionReviews.

Also made the NegotiationSerializer setup static
2018-03-09 13:54:27 -08:00
Kubernetes Submit Queue 71b40cbce5
Merge pull request #60943 from jennybuckley/webhook-https-url
Automatic merge from submit-queue (batch tested with PRs 60906, 60943). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make admission webhooks honor scheme part of url

**What this PR does / why we need it**:
Bug fix, allow webhooks to use the scheme provided in clientConfig, instead of defaulting to http.
(more in issue)

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

```release-note
Bug fix, allow webhooks to use the scheme provided in clientConfig, instead of defaulting to http.
```

/kind bug
/sig api-machinery
2018-03-08 15:18:46 -08:00
Kubernetes Submit Queue 56195fd1d3
Merge pull request #60891 from shyamjvs/go-back-to-etcd-3.1.10
Automatic merge from submit-queue (batch tested with PRs 60891, 60935). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Rollback etcd server version to 3.1.11 due to #60589

Ref https://github.com/kubernetes/kubernetes/issues/60589#issuecomment-371171837

The dependencies were a bit complex (so many things relying on it) + the version was updated to 3.2.16 on top of the original bump.
So I had to mostly make manual reverting changes on a case-by-case basis - so likely to have errors :)

/cc @wojtek-t @jpbetz 

```release-note
Downgrade default etcd server version to 3.1.11 due to #60589
```

(I'm not sure if we should instead remove release-notes of the original PRs)
2018-03-08 12:45:46 -08:00
jennybuckley 7d5696eb6d Make admission webhooks not ignore scheme 2018-03-08 11:35:13 -08:00
Shyam Jeedigunta 21f5e69f08 Rollback etcd server version to 3.1.11 due to #60589 2018-03-08 13:07:15 +01:00
Kubernetes Submit Queue a0844c17bf
Merge pull request #60682 from hanxiaoshuai/update0302
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update Mount propagation version in comment

**What this PR does / why we need it**:
Mount propagation feature was moved to beta in PR [#59252](https://github.com/kubernetes/kubernetes/pull/59252), so update the comment.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #60657 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-07 17:20:04 -08:00
Kubernetes Submit Queue bad8e0d91c
Merge pull request #60838 from CaoShuFeng/amdission_controller_glog
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

log enabled admission controller in order

After switching to --enable-admission-plugins/--disable-admission-plugins, some admission controller may start silently. And these admission controllers may modify or forbid objects. This pull request does a lot of help for admin to trouble shooting.

/assign @hzxuzhonghu @sttts 

**Release note**:
```release-note
NONE
```
2018-03-07 11:21:13 -08:00
Cao Shufeng 4c6db2516a log enabled admission controller in order 2018-03-07 10:18:11 +08:00
Kubernetes Submit Queue f196b7c752
Merge pull request #60805 from ericchiang/oidc-owners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

oidc: add rithujohn191 as a reviewer

cc @rithujohn191

/sig auth
/kind documentation

```release-note
NONE
```
2018-03-06 16:04:42 -08:00
Kubernetes Submit Queue 9aae9b58a5
Merge pull request #59836 from jpbetz/etcd-3.2.16-patch-upgrade
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bump etcd server patch version to 3.2.16

etcd 3.2.16 contains a critical fix for HA clusters: https://github.com/coreos/etcd/pull/9281

Also, update newly added tests to use `REGISTRY` make variable.

Release note:
```release-note
Upgrade the default etcd server version to 3.2.16
```
2018-03-06 10:00:53 -08:00
Kubernetes Submit Queue 04634cb198
Merge pull request #60454 from erictune/update-sample-apiserver-readme
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update README.md of sample-apiserver.

Mention CRDs as option.
Link to CRD vs Aggr. docs.
Mention apiserver-builder as alternative.

```release-note
NONE
```
2018-03-06 00:09:59 -08:00
Kubernetes Submit Queue 5066a67caa
Merge pull request #59840 from jennybuckley/webhooks-on-webhooks
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Prevent webhooks from affecting admission requests for WebhookConfiguration objects

**What this PR does / why we need it**:
As it stands now webhooks can be added to the system which make it impossible for a user to remove that webhook, or two webhooks could be registered which make it impossible to remove each other.

The first commit of this will add a test to make sure webhook deletion is never blocked by a webhook. This test will fail until the second commit is added which will prevent webhooks from affecting admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects in the admissionregistration.k8s.io group

- [x] Test that webhook deletion is never blocked by a webhook ([test fails before second commit](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/59840/pull-kubernetes-e2e-gce/23731/))
- [x] Prevent webhooks from being called on admission requests for [Validating|Mutating]WebhookConfiguration objects
- [x] Document this new behavior maybe in another PR

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of fixing #59124 (Verifies that it can remove the broken webhook.)

**Release note**:
```release-note
ValidatingWebhooks and MutatingWebhooks will not be called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects in the admissionregistration.k8s.io group
```
2018-03-05 19:09:33 -08:00
jennybuckley b4abf56312 Run hack/update-all.sh 2018-03-05 16:36:11 -08:00
jennybuckley 58b43ad27d Prevent webhooks from affecting admission requests for webhooks 2018-03-05 16:35:52 -08:00
Joe Betz 04c6d0ab26 Bump etcd server patch version to 3.2.16 2018-03-05 13:58:51 -08:00
Eric Chiang 3561f23128
oidc: add rithujohn191 as a reviewer 2018-03-05 10:44:33 -08:00
Aleksandra Malinowska 09606310ac Fix initializing watch cache 2018-03-05 15:28:14 +01:00
Eric Tune af4aec6976 Update README.md of sample-apiserver.
Mention CRDs as option.
Link to CRD vs Aggr. docs.
Mention apiserver-builder as alternative.
2018-03-02 16:56:29 -08:00
Nikhita Raghunath bae2db8b95 bump(6644d4): spf13/cobra: support bash completion for aliases 2018-03-02 21:28:13 +05:30
hangaoshuai 805ac2c0f0 update Mount propagation version in comment 2018-03-02 13:03:30 +08:00
Kubernetes Submit Queue 6605b0a645
Merge pull request #60530 from superbrothers/fix-60517
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubectl completion so that file names are listed

**What this PR does / why we need it**:
This PR fixes kubectl completion so that file names are listed with `--filename`. I tested in bash and zsh. This problem is caused by spf13/cobra#520, so I updates vendor github.com/spf13/cobra to just before that commit.

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

**Special notes for your reviewer**: @janetkuo @mengqiy @eparis 

**Release note**:

```release-note
NONE
```
2018-03-01 18:18:07 -08:00
Kubernetes Submit Queue 060a66ae20
Merge pull request #60591 from MrHohn/fix-probableEOF-panic
Automatic merge from submit-queue (batch tested with PRs 52077, 60456, 60591). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[e2e] Fix panicing ingress jobs

**What this PR does / why we need it**:
When a nil error is passed into IsProbableEOF(), test will panic. Ref https://github.com/kubernetes/kubernetes/issues/60381#issuecomment-369353511.

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

**Special notes for your reviewer**:
/assign @shyamjvs 
cc @krzyzacy 

**Release note**:

```release-note
NONE
```
2018-03-01 15:23:57 -08:00
Kubernetes Submit Queue 16980f21d1
Merge pull request #52077 from krmayankk/runas
Automatic merge from submit-queue (batch tested with PRs 52077, 60456, 60591). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

API Changes for RunAsGroup

First set of api changes for feature https://github.com/kubernetes/community/pull/756
```release-note
Add ability to control primary GID of containers through pod Spec and PodSecurityPolicy
```
2018-03-01 15:23:51 -08:00
Kubernetes Submit Queue 209cdd9048
Merge pull request #60237 from crassirostris/audit-use-buffered-backend
Automatic merge from submit-queue (batch tested with PRs 60542, 60237). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Audit use buffered backend

This is the next step after https://github.com/kubernetes/kubernetes/pull/60076

This PR fixes https://github.com/kubernetes/kubernetes/issues/53020, to address https://github.com/kubernetes/kubernetes/issues/53006 later

In this PR buffered backend, introduced in https://github.com/kubernetes/kubernetes/pull/60076, is used to replace ad-hoc solution for webhook and add an ability to enable buffering for the log audit backend.

```release-note
Log audit backend can now be configured to perform batching before writing events to disk.
```

/cc @sttts @tallclair @ericchiang @CaoShuFeng
2018-03-01 11:42:48 -08:00
Kubernetes Submit Queue 571b1e20aa
Merge pull request #60542 from liggitt/terminating-crd
Automatic merge from submit-queue (batch tested with PRs 60542, 60237). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow update/patch of CRs while CRD is terminating

Fixes #60538

Update/patch need to be allowed so finalizers can act on custom resources for terminating CRDs

```release-note
Fixes potential deadlock when deleting CustomResourceDefinition for custom resources with finalizers
```
2018-03-01 11:42:45 -08:00
Mik Vyatskov 881e6d4f6f Add buffering to the log audit backend
Signed-off-by: Mik Vyatskov <vmik@google.com>
2018-03-01 14:30:51 +01:00
Mayank Kumar b888415ebf API Changes for RunAsGroup and Implementation and e2e 2018-02-28 22:09:56 -08:00
Kubernetes Submit Queue cb9d6b5155
Merge pull request #59495 from ericchiang/client-auth-exec
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 client-go: add an exec-based client auth provider

Updates https://github.com/kubernetes/features/issues/541
Implements https://github.com/kubernetes/community/pull/1503
Closes https://github.com/kubernetes/kubernetes/issues/57164

```release-note
client-go: alpha support for exec-based credential providers
```

/sig auth
/kind feature
2018-02-28 22:03:16 -08:00
Zihong Zheng 59b878f3e0 Check nil error in IsProbableEOF() 2018-02-28 15:21:19 -08:00
Kubernetes Submit Queue 2ae902a04e
Merge pull request #52900 from xiangpengzhao/remove-ed-const
Automatic merge from submit-queue (batch tested with PRs 60342, 60505, 59218, 52900, 60486). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use consts defined in api instead of defining another ones.

**What this PR does / why we need it**:
empty_dir defines some consts. There are already similar consts in api types. So remove the local ones in empty_dir.

**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
```
2018-02-28 06:07:31 -08:00
Kubernetes Submit Queue e2cbda006a
Merge pull request #60280 from hanxiaoshuai/cleanup0223
Automatic merge from submit-queue (batch tested with PRs 60470, 59149, 56075, 60280, 60504). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove unused function negotiate() and writeYAML()

**What this PR does / why we need it**:
remove unused function negotiate() and writeYAML() in k8s.io/apiserver/pkg
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-28 04:54:36 -08:00
Kubernetes Submit Queue b8c5bcf48a
Merge pull request #60291 from hzxuzhonghu/cloud-cm-use-healthz
Automatic merge from submit-queue (batch tested with PRs 60376, 55584, 60358, 54631, 60291). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cloud-controller-manager get /healthz to wait for apiserver to be healthy

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

currently cloud-controller-manager use `restclient.ServerAPIVersions()` to wait for apiserver to be healthy.
Remove ServerAPIVersions and make use of /healthz as all other components do.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-28 03:37:37 -08:00
hzxuzhonghu 8908c5d0a0 run update bazel 2018-02-28 17:25:03 +08:00
hzxuzhonghu 817176572d remove unused rest/versions.go 2018-02-28 17:25:01 +08:00
Eric Chiang 01801ae13a
generated 2018-02-27 21:21:14 -08:00
Eric Chiang 6463e9efd9
client-go: add an exec-based client auth provider 2018-02-27 21:21:13 -08:00
Jordan Liggitt df7f96fc20
Allow update/patch of CRD while terminating 2018-02-27 21:51:50 -05:00
Kazuki Suda cd32f96c28 Fix kubectl completion so that file names are listed 2018-02-28 09:04:59 +09:00
Ryan Hitchman 4d2e43f53f Fix build tag for grpc_service_unix_test.go. 2018-02-27 13:53:32 -08:00
Ryan Hitchman e04b91facf Remove unused variables (only assigned to) from test code.
This is revealed by the go/types package, which is stricter than
the Go compiler about unused variables. See also: golang/go#8560
2018-02-27 13:45:31 -08:00
Kubernetes Submit Queue 724a2f968c
Merge pull request #60446 from cblecker/no-dep-reviewer
Automatic merge from submit-queue (batch tested with PRs 59365, 60446, 60448, 55019, 60431). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove dep-reviewers

**What this PR does / why we need it**:
The dep-reviewers group seems to get assigned PRs early the the review process. However, most code changes should be reviewed in the importing part of the code base first, and then assigned to an approver after.

By removing the reviewers group, the approvers plugin will still suggest assigning to an approver, but won't assign for review when the PR is initially opened.

**Release note**:

```release-note
NONE
```
2018-02-27 10:50:38 -08:00
xiangpengzhao 22ea748809 Use consts defined in api instead of defining another ones. 2018-02-28 00:40:58 +08:00
Kubernetes Submit Queue d1806263f4
Merge pull request #60220 from MaciekPytel/external_metrics_client
Automatic merge from submit-queue (batch tested with PRs 59674, 60059, 60220, 58916, 60336). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Client for external metrics

Add client for External Metrics API introduced in https://github.com/kubernetes/kubernetes/pull/60079.

This PR is just client all the API changes are included from https://github.com/kubernetes/kubernetes/pull/60079.
2018-02-27 03:31:39 -08:00
Kubernetes Submit Queue 1eb1c00c44
Merge pull request #59674 from jennybuckley/codegen
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

code-gen: output golint compliant 'Generated by' comment

New PR instead of reopening #58115 because /reopen did not work.
This won't be ready to merge until the upstream https://github.com/kubernetes/gengo/pull/94 merges. Once that merges, the second commit will be changed to godep-save.sh and update-staging-godeps.sh, and the last commit will be changed to update-all.sh

The failing test is due to the upstream changes not being merged yet

```devel-release-note
Go code generated by the code generators will now have a comment which allows them to be easily identified by golint
```

Fixes #56489
2018-02-27 02:47:05 -08:00
Kubernetes Submit Queue effa021db7
Merge pull request #59725 from wgliang/master.vet
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix some syntax related errors

**What this PR does / why we need it**:
fix some syntax related errors

**Special notes for your reviewer**:
None

```release-note
NONE
```
2018-02-27 01:45:01 -08:00
Kubernetes Submit Queue d6153194d9
Merge pull request #59293 from roycaihw/openapi_endpoint
Automatic merge from submit-queue (batch tested with PRs 60011, 59256, 59293, 60328, 60367). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Serve OpenAPI spec with single /openapi/v2 endpoint

**What this PR does / why we need it**:
We are deprecating format-separated endpoints (`/swagger.json`, `/swagger-2.0.0.json`, `/swagger-2.0.0.pb-v1`, `/swagger-2.0.0.pb-v1.gz`) for OpenAPI spec, and switching to a single `/openapi/v2` endpoint in Kubernetes 1.10. The design doc and deprecation process are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU

Requested format is specified by setting HTTP headers

header | possible values
-- | --
Accept | `application/json`, `application/com.github.proto-openapi.spec.v2@v1.0+protobuf`
Accept-Encoding | `gzip`

This PR changes dynamic_client (and kubectl as a result) to use the new endpoint. The old endpoints will remain in 1.10 and 1.11, and get removed in 1.12. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
action required: Deprecate format-separated endpoints for OpenAPI spec. Please use single `/openapi/v2` endpoint instead.
```

/sig api-machinery
2018-02-26 23:47:53 -08:00
Kubernetes Submit Queue 5e10b13f7e
Merge pull request #59958 from ixdy/bzl-boilerplate
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Require boilerplate on Bazel Skylark source files

**What this PR does / why we need it**: `.bzl` files are also source code, so they should probably have the boilerplate text too.

**Release note**:

```release-note
NONE
```
2018-02-26 21:34:45 -08:00
jennybuckley c8dacd8e63 Run hack/update-all.sh 2018-02-26 17:16:14 -08:00
Christoph Blecker b97b9530f0
Remove dep-reviewers 2018-02-26 17:04:32 -08:00