Commit Graph

1591 Commits

Author SHA1 Message Date
Kubernetes Publisher 45cadb0433 Merge pull request #60373 from sttts/sttts-1.10-cfssl
Automatic merge from submit-queue (batch tested with PRs 60373, 61098, 61352, 61359, 61362). 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 cfssl to be compatible with Go 1.10

Kubernetes-commit: ef3539e69e4c897f48ecd6b2dd73417ce0416b08
2018-03-22 06:55:14 +00:00
Kubernetes Publisher 5d130da6bf Merge pull request #60881 from hanxiaoshuai/addut0307
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>.

add unit test for function FeatureGateSetFromMap and FeatureGateString

**What this PR does / why we need it**:
add unit test for function FeatureGateSetFromMap and FeatureGateString
**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
```

Kubernetes-commit: cba7843cb403e1d7864a59949e0ec6c8927ea403
2018-03-22 06:54:33 +00:00
rithu john 2c968342df oidc authentication: email_verified claim is not required for JWT validation
Kubernetes-commit: 1f25319077f9b371440a66eebbd3d1e0edcbfda9
2018-03-21 16:15:17 -07:00
Kubernetes Publisher 08ff95861c Merge pull request #59172 from fisherxu/removeyear
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>.

Remove YEAR field of all generated files and fix kubernetes boilerplate checker

**What this PR does / why we need it**:
Remove YEAR field of all generated files and fix kubernetes boilerplate checker
xref: [remove YEAR fileds in gengo #91](https://github.com/kubernetes/gengo/pull/91)

**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 [#gengo/issues/24](https://github.com/kubernetes/gengo/issues/24)

**Special notes for your reviewer**:
/cc @thockin @lavalamp @sttts

**Release note**:

```release-note
NONE
```

Kubernetes-commit: e40ffd71972b820aeed283946e880aa2479f8524
2018-03-21 22:54:42 +00:00
Kubernetes Publisher 6859fb6bde Merge pull request #61075 from tallclair/feature-owners
Automatic merge from submit-queue (batch tested with PRs 61087, 61075, 61213, 61149, 60826). 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>.

Grant sig leads feature approval powers

**What this PR does / why we need it**:
Sig leads already approve features for milestones and do a lot of code reviews. They should be able to approve changes to the associated feature gates, rather than needing to escalate every feature to root owners.

I omitted some sigs that shouldn't need to approve features in the base repo. LMK if I missed any, or these should be included in the approvers:

- AWS
- Azure
- Big Data
- Contributor Experience
- Docs
- GCP
- OpenStack
- Product Management
- Service Catalog
- Testing
- UI

For posterity, here's the script I used: https://gist.github.com/tallclair/1128aefa3186b0c3a8f4603929d2354e

**Special notes for your reviewer**:

@sig-leads: Please use responsibly :)

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

Kubernetes-commit: d84c938da5438e05eacb7437aa3602927c857b0b
2018-03-21 14:54:02 +00:00
Kubernetes Publisher 48c4b41872 Merge pull request #61105 from lcfang/test0313-2
Automatic merge from submit-queue (batch tested with PRs 57871, 61094, 60459, 61089, 61105). 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 the outdated TODO

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

remove the outdated TODO in [a7d6340ad2/staging/src/k8s.io/apiserver/pkg/registry/rest/meta.go (L42))

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

Kubernetes-commit: 025439988428d2b78342549419706639cd6e52a6
2018-03-21 10:53:42 +00:00
Kubernetes Publisher ba6d999b6e Merge pull request #60971 from CaoShuFeng/audit_throttle_burst
Automatic merge from submit-queue (batch tested with PRs 60919, 60953, 61085, 61083, 60971). 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>.

[advanced audit]fix comment about throttle burst

/assign @sttts

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

Kubernetes-commit: ad432fa6bde65adad109f484a31f229de593b570
2018-03-21 06:53:38 +00:00
Kubernetes Publisher a0787f2213 Merge pull request #61083 from hzxuzhonghu/bug-fix-0313
Automatic merge from submit-queue (batch tested with PRs 60919, 60953, 61085, 61083, 60971). 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 bug in apiserver.k8s.io RootScopedKinds

RootScopedKinds in group ` apiserver.k8s.io` should be `AdmissionConfiguration`

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 32d6a9356d8659236806cd8bd5c2817a2b809819
2018-03-21 06:53:06 +00:00
hzxuzhonghu c5ff2cea2f etcd client add dial timeout
Kubernetes-commit: 814401fc902a7083bfd9933e245a2be62abfed60
2018-03-21 14:45:13 +08:00
Jordan Liggitt 5d3eda3ed6 Deprecate repair-malformed-updates flag, move object meta mutation into BeforeCreate
Kubernetes-commit: 7f840f4441957a6024f28262fafcde4696dac6c3
2018-03-21 01:20:34 -04:00
Kubernetes Publisher 3664ae76d4 Merge pull request #61003 from CaoShuFeng/amdission_controller_glog_v2
Automatic merge from submit-queue (batch tested with PRs 61003, 61031, 60360, 58349, 60922). 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

This change log enabled mutating and validating admission controller
in order.

ref: https://github.com/kubernetes/kubernetes/pull/60838/files#r173295334

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

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

Kubernetes-commit: 4c8657c0872eb2835e1c9dac1114366d915c4381
2018-03-21 02:53:11 +00:00
Kubernetes Publisher 46b6e08373 Merge pull request #60759 from hzxuzhonghu/etcd-flag-validate
Automatic merge from submit-queue (batch tested with PRs 60759, 60531, 60923, 60851, 58717). 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>.

validate EtcdOptions.EtcdServersOverrides in EtcdOptions.Validate

move `EtcdOptions.EtcdServersOverrides` validation from `BuildStorageFactory` to `EtcdOptions.Validate`, which fails fast in kube-apiserver startup.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 691a7d43588692501e27be2375bebad1c30b7ae5
2018-03-21 02:52:38 +00:00
Kubernetes Publisher 01dfd88805 Merge pull request #60702 from hzxuzhonghu/kube-apiserver-cleanup
Automatic merge from submit-queue (batch tested with PRs 60363, 59208, 59465, 60581, 60702). 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>.

apiserver clean code

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

1. clean up some redundant code in kube-apiserver startup

1. comment on `preparedGenericAPIServer`, which is just a wrapper of `GenericAPIServer`.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 18d9e1c450d6e080dad11af1f27d371325fba5ef
2018-03-20 14:57:56 +00:00
hzxuzhonghu 2515aae7de remove unused code
Kubernetes-commit: fffa40552cc9f6d372607d1ed40a44d97cecb314
2018-03-20 18:50:19 +08:00
hzxuzhonghu 240b9cf032 remove unused rls-ca-file flag
Kubernetes-commit: 9c0803e14c0d76e2e8225db546c0d2ce0b522ab7
2018-03-20 15:26:31 +08:00
Kubernetes Publisher 837069aa36 Merge pull request #59728 from wgliang/master.append
Automatic merge from submit-queue (batch tested with PRs 59740, 59728, 60080, 60086, 58714). 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>.

more concise to merge the slice

**What this PR does / why we need it**:
more concise to merge the slice

**Special notes for your reviewer**:

Kubernetes-commit: c64f19dd1b5d0f81dd4d59cf6aa5c23cf1e46f5d
2018-03-20 05:41:11 +00:00
Slawomir Chylek 291f8ff37c vendor: Update github.com/evanphx/json-patch
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
2018-03-19 15:34:55 +01:00
Dr. Stefan Schimanski 28595d407b apiserver: add warning about not trusting authz of aggregator
Kubernetes-commit: 50b98169ede9648769ce471150b1ab9ceb06bc0c
2018-03-19 13:37:52 +01:00
immutablet dfdceff3c6 Instrument transformer.go with latency metrics.
Kubernetes-commit: bfcb3cd91f93669b94ea80eadebdff769c88952e
2018-03-16 14:25:26 -07:00
immutablet f44ea185da Instrument transformer.go with latency metrics.
Kubernetes-commit: 04a6613fb565a54b6a74e5bfad8844928e98a59b
2018-03-15 14:13:24 -07:00
Kubernetes Publisher 627fa76a8b sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:38:17 +00:00
hangaoshuai f5c57057ab remove unused code authenticator/password/allow
Kubernetes-commit: bf44c29932711c27d4b64e2443627fd16e809119
2018-03-15 17:14:28 +08:00
hzxuzhonghu dff0e6ac00 check etcd servers by a random order
Kubernetes-commit: ea627f987507de38dfc46ab2d9c924690eba5ee9
2018-03-15 10:04:40 +08:00
Kubernetes Publisher 8e2fdf0297 Merge pull request #60739 from tallclair/audit-buffer
Automatic merge from submit-queue (batch tested with PRs 60737, 60739, 61080, 60968, 60951). 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 default auditing options.

- Log backend defaults to blocking mode (backwards compatability)
- Webhook backend defaults to throttled
- Fix webhook validation
- Add options test

**Which issue(s) this PR fixes**:
Fixes #60719

**Special notes for your reviewer**:
This PR is an alternative fix to https://github.com/kubernetes/kubernetes/pull/60727. If the rollback goes in first, I'll rebase this on a roll-forward.

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

Kubernetes-commit: c13d9ffea959c895ee250f5f094a648c5dd0e924
2018-03-13 22:59:39 +00:00
Kubernetes Publisher f0b23db766 Merge pull request #61004 from CaoShuFeng/audit_webhook_initialBackoff
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 option --audit-webhook-initial-backoff

Before this change, --audit-webhook-initial-backoff has no effect

@crassirostris @sttts

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

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

Kubernetes-commit: 25c8871bd08f2fc1914e65b0d2de281a30c212b2
2018-03-13 19:02:24 +00:00
lcfang 39fbe7ba58 remove the outdated TODO
Kubernetes-commit: 9be76ec461e6bd2bddb5ab26b41b3ef5938e0791
2018-03-13 20:31:01 +08:00
hzxuzhonghu 166387d3d7 fix bug in apiserver.k8s.io install
Kubernetes-commit: f66c9b388fd276293ac9b430cac2ecf88b236e5d
2018-03-13 14:47:05 +08:00
Tim Allclair 8d9c5be000 Grant sig leads feature approval powers
Kubernetes-commit: 9afc4242d367025454fc201519a29f77973ce29f
2018-03-12 11:34:33 -07:00
Dr. Stefan Schimanski adb35656a1 apiserver: cancel context on timeout in WithTimeoutForNonLongRunningRequests
Kubernetes-commit: f3ba7f95585cdcce19579d757dadbf3c8a9f8e0b
2018-03-12 17:11:11 +01:00
Kubernetes Publisher 714f8b96ae 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

Kubernetes-commit: fd3cbc9bbfb63b78cfc3beaf1d6d042f71d8e73a
2018-03-12 14:59:43 +00:00
Cao Shufeng 6466b038b4 fix option --audit-webhook-initial-backoff
Before this change, --audit-webhook-initial-backoff has no effect

Kubernetes-commit: 5bc5cd1b2ccb0b9fb5e652b579b4fb379428cb56
2018-03-10 17:44:20 +08:00
Cao Shufeng e75ab8e707 log enabled admission controller in order
This change log enabled mutating and validating admission controller
in order.

Kubernetes-commit: 76aaba6d247fa479763fefa2d57c625077100d78
2018-03-10 16:20:12 +08:00
David Eads 416f1ae672 update metrics to true like it is for kube-apiserver
Kubernetes-commit: 456fd386dc6db8ba5ced338a5935de8229c14047
2018-03-09 14:36:04 -05:00
Chao Xu f86f44d94d 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

Kubernetes-commit: 3ab516035d17c2b2798797eb8ee85522ccbc051e
2018-03-09 11:25:34 -08:00
Cao Shufeng 0e5b010b14 [advanced audit]fix comment about throttle burst
Kubernetes-commit: c6f72c20d121a8f4e161d490af0aa2db48e05caf
2018-03-09 18:07:04 +08:00
Kubernetes Publisher f5f5413e42 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

Kubernetes-commit: 71b40cbce509960cb020822c85e05b379c37d722
2018-03-09 03:00:38 +00:00
jennybuckley c28dea8a20 Make admission webhooks not ignore scheme
Kubernetes-commit: 7d5696eb6d98a0ce76e4fe18c3e37aec05060b46
2018-03-08 11:35:13 -08:00
hangaoshuai 9c6162ac42 add unit test for function FeatureGateSetFromMap and FeatureGateString
Kubernetes-commit: 95eaccb0959af0ec91c3c4356a528516a5dc693f
2018-03-08 18:52:36 +08:00
Kubernetes Publisher 6b9d9252a8 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
```

Kubernetes-commit: bad8e0d91cfd8a3e2a40ded61716629970a082c6
2018-03-07 23:12:17 +00:00
hzxuzhonghu 36d4e5d544 run update bazel
Kubernetes-commit: e5449d32f9a3c412598cae65192e7ea8c6cc3689
2018-03-07 13:08:13 +08:00
hzxuzhonghu 805ad14201 add test case for request context mapper
Kubernetes-commit: 3f73ccfcde3bc1ff9bb24d3ec9f3154feb97e166
2018-03-07 11:44:36 +08:00
Kubernetes Publisher aaa9618c2d 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
```

Kubernetes-commit: f196b7c7523dbf0d6ed703a93af73f54e9d2e42c
2018-03-07 03:17:39 +00:00
Cao Shufeng 8779e14501 log enabled admission controller in order
Kubernetes-commit: 4c6db2516a7597bd0be5c1f3a3905b8894a18e6a
2018-03-06 17:40:34 +08:00
Kubernetes Publisher 0c45f99421 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
```

Kubernetes-commit: 5066a67caaf8638c7473d4bd228037d0c270c546
2018-03-06 07:08:15 +00:00
hzxuzhonghu 4acae24757 optimize requestcontext: use RWMutex and atomic.Value
Kubernetes-commit: 564d53f71b3fb52e956e4bece12483e4ba3f6248
2018-03-06 11:20:46 +08:00
jennybuckley 89e1aa5933 Prevent webhooks from affecting admission requests for webhooks
Kubernetes-commit: 58b43ad27d00191cf5291d8508dc346f1924b785
2018-03-05 16:35:52 -08:00
Kubernetes Publisher 172cbbd717 Merge pull request #60715 from aleksandra-malinowska/apiserver-cache-init
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 initializing watch cache

When initializing watch cache, set auxiliary fields in `storeElement` object. Fixes #60507.

```release-note
NONE
```

Kubernetes-commit: e2dee6073933c99b63addecfd6397c058b512cd4
2018-03-05 19:13:20 +00:00
Eric Chiang d75d797054 oidc: add rithujohn191 as a reviewer
Kubernetes-commit: 3561f23128a35a53256e541776eea1a7c3437c11
2018-03-05 10:44:33 -08:00
hzxuzhonghu 422369e23b move EtcdServersOverrides to EtcdOptions flags validate
Kubernetes-commit: f380ac8cec8061bf6533ccecd02ec49d9a5b016f
2018-03-05 11:32:59 +08:00
Tim Allclair d89e8e9460 Fix default auditing options.
- Log backend defaults to blocking mode (backwards compatability)
- Fix webhook validation
- Add options test

Kubernetes-commit: e004257919d779d56f27ad84c7f33799cc7ab580
2018-03-02 15:16:37 -08:00