Commit Graph

2013 Commits

Author SHA1 Message Date
Christoph Blecker 3b89884e24 Remove dep-reviewers
Kubernetes-commit: b97b9530f08d40a4346ea328d8a1047822fb92b7
2018-02-26 11:11:15 -08:00
Dr. Stefan Schimanski 30b4ebf462 Update staging godeps
Kubernetes-commit: 6a381aa053af595568d985cf7c01b8377fd5914b
2018-02-26 09:04:21 +01:00
Dr. Stefan Schimanski 1d8690c3c5 apiserver: fix testing etcd config in preparation for etcd 3.2.16+
Kubernetes-commit: 73971e69ac3d855b6ecbfa15c5bbe454d96e89b7
2018-02-23 13:58:08 +01:00
hangaoshuai 8e51703adb remove unused function negotiate() and writeYAML()
Kubernetes-commit: 5f908c226c9df144dfc0e1665381b8ec534a60a4
2018-02-23 14:53:51 +08:00
Mike Danese 3ec7dfbb59 kms: rename KMSService to KeyManagmentService
KMSService is redundent.

Kubernetes-commit: fc8ff61eb9e153d9e3f67549b8454cdea89bab30
2018-02-22 19:36:03 -08:00
hzxuzhonghu 7fb69020af fix typo and remove inaccurate TODO
Kubernetes-commit: d94925af8854031f1548466c655afd3119613785
2018-02-23 09:27:37 +08:00
Mik Vyatskov 9169f6d300 Add buffering to the log audit backend
Signed-off-by: Mik Vyatskov <vmik@google.com>

Kubernetes-commit: 881e6d4f6f905079b2c27299e7b631b6903b6815
2018-02-22 19:52:33 +01:00
Filip Filmar fad0fdecfa Implements distributed OIDC claims.
A distributed claim allows the OIDC provider to delegate a claim to a
separate URL.  Distributed claims are of the form as seen below, and are
defined in the OIDC Connect Core 1.0, section 5.6.2.

See: https://openid.net/specs/openid-connect-core-1_0.html#AggregatedDistributedClaims

Example claim:

```
{
  ... (other normal claims)...
  "_claim_names": {
    "groups": "src1"
  },
  "_claim_sources": {
    "src1": {
      "endpoint": "https://www.example.com",
      "access_token": "f005ba11"
    },
  },
}
```

Example response to a followup request to https://www.example.com is a
JWT-encoded claim token:

```
{
  "iss": "https://www.example.com",
  "aud": "my-client",
  "groups": ["team1", "team2"],
  "exp": 9876543210
}
```

Apart from the indirection, the distributed claim behaves exactly
the same as a standard claim.  For Kubernetes, this means that the
token must be verified using the same approach as for the original OIDC
token.  This requires the presence of "iss", "aud" and "exp" claims in
addition to "groups".

All existing OIDC options (e.g. groups prefix) apply.

Any claim can be made distributed, even though the "groups" claim is
the primary use case.

Allows groups to be a single string due to
https://github.com/kubernetes/kubernetes/issues/33290, even though
OIDC defines "groups" claim to be an array of strings. So, this will
be parsed correctly:

```
{
  "iss": "https://www.example.com",
  "aud": "my-client",
  "groups": "team1",
  "exp": 9876543210
}
```

Expects that distributed claims endpoints return JWT, per OIDC specs.

In case both a standard and a distributed claim with the same name
exist, standard claim wins.  The specs seem undecided about the correct
approach here.

Distributed claims are resolved serially.  This could be parallelized
for performance if needed.

Aggregated claims are silently skipped.  Support could be added if
needed.

Kubernetes-commit: dfb527843ca1720ad64383fa5d6baea4113daa3e
2018-02-22 02:14:50 -08:00
Mike Danese d29f39fc48 autogenerated
Kubernetes-commit: 6c5e8005f73d00afefb56cf8cefab2a44f2c639e
2018-02-20 12:50:53 -08:00
Haowei Cai 8080a6e06e Add new openapi endpoint in aggregator server
Kubernetes-commit: 2eb3d046ce8b0a1b500d68d5a83fa7e575da7ca9
2018-02-20 09:22:25 -08:00
Haowei Cai 2758225d54 Bump kube-openapi to add new openapi endpoint
Kubernetes-commit: 8b38e080c4ddd3e1416a5fc4d45a3e4d2dbe1033
2018-02-20 09:21:41 -08:00
Mik Vyatskov 054769c183 Introduce buffered audit backend
Signed-off-by: Mik Vyatskov <vmik@google.com>

Kubernetes-commit: 3f0e49aea430c30f4539d34c0f93486fd451d073
2018-02-20 15:25:46 +01:00
Wojciech Tyczynski b81f74623f Fix race in healthchecking etcds leading to crashes
Kubernetes-commit: 38387aec0db3eda3a7debb4558a223ac92a41389
2018-02-20 12:17:39 +01:00
Mik Vyatskov b2b70701e1 Make advanced audit output version configurable.
Signed-off-by: Mik Vyatskov <vmik@google.com>

Kubernetes-commit: ad25d1f9ec398e5f9e91fd225cbbfdc5aa00973f
2018-02-19 21:15:49 +01:00
Mike Spreitzer aa5d4f9f32 Fixes for HTTP/2 max streams per connection setting
This PR makes two changes.  One is to introduce a parameter
for the HTTP/2 setting that an api-server sends to its clients
telling them how many streams they may have concurrently open in
an HTTP/2 connection.  If left at its default value of zero,
this means to use the default in golang's HTTP/2 code (which
is currently 250).

The other change is to make the recommended options for an aggregated
api-server set this limit to 1000.  The limit of 250 is annoyingly low
for the use case of many controllers watching objects of Kinds served
by an aggregated api-server reached through the main api-server (in
its mode as a proxy for the aggregated api-server, in which it uses a
single HTTP/2 connection for all calls proxied to that aggregated
api-server).

Fixes #60042

Kubernetes-commit: 201c11f147c85b029665915bee3a62eea19d6d57
2018-02-19 14:18:07 -05:00
Kubernetes Publisher 340af4b1e3 Merge pull request #59398 from CaoShuFeng/audit_user_nil
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 invalid match rules for advanced audit policy

When users or groups are set in a rule, this rule should not match
attribute with unauthorized request where user and group are nil.

**Release note**:
```release-note
Unauthorized requests will not match audit policy rules where users or groups are set.
```

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

Kubernetes-commit: 89ac18de1a71d08d2bd7654c325cd8aa476190bd
2018-02-19 17:25:14 +00:00
Jeff Grafton 1ab12b2dc8 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08:00
Kubernetes Publisher 43a9f1d3a4 Merge pull request #57700 from porridge/improve-msg-conn-kill
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>.

Improve the error message.

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

Makes the error message more descriptive and less scary. Previously it
is far from obvious whether connection kill is a symptom or cause of the
problem, see for example https://github.com/kubernetes/kubernetes/issues/55779#issuecomment-353582852

In paricular the crucial missing piece of information is that this is a
way of handling a timeout.

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

Kubernetes-commit: f9c3a0abc7b40ea17d68a4f919fd844279ddcb58
2018-02-16 17:23:42 +00:00
Kubernetes Publisher bc91052497 Merge pull request #59870 from deads2k/admission-21-decorator
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 an admission decorator chain

Admission decorators are good wrappers for general function, but we logically need a chain of them.  This builds a chain similar to admission.

/assign @sttts
@kubernetes/sig-api-machinery-pr-reviews

Kubernetes-commit: f223f905427fa3641ab163100c22fc7e8cc574f0
2018-02-16 17:23:11 +00:00
Kubernetes Publisher dae602d9d9 Merge pull request #59871 from wojtek-t/cache_fields_and_labels
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>.

Store labels and fields with object

We are already computing labels and fields before putting objects in watchcache.
And my tests show this is `PodToSelectableFields` is responsible for ~10% of memory allocations.
This PR is supposed to fix that - let's double check by running kubemark-big on it.

Kubernetes-commit: d336607679743a53ed93edbebf89f45dd957e46d
2018-02-16 13:25:29 +00:00
Kubernetes Publisher 1aaf438933 Merge pull request #59899 from mikedanese/authz
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>.

apiserver: fix some typos from refactor

introduced in #59582

```release-note
NONE
```

Kubernetes-commit: d3dc4584f9dcf3a28feee3048a391fbce6762563
2018-02-16 13:24:47 +00:00
Christoph Blecker 126ff50079 Re-add OWNERS files to Godeps/vendor dirs
Kubernetes-commit: 6fb2304f2a6da44e42985ed662d5f7f56215eec6
2018-02-15 13:31:02 -08:00
Mike Danese a7b5c83c7b apiserver: fix some typos from refactor
introduced in #59582

Kubernetes-commit: 83c1334e5110e6f492f0e375488978ebb16a62a5
2018-02-14 17:47:42 -08:00
Mike Danese cee5e95803 remove deprecated /proxy paths
These were depercated in v1.2.

Kubernetes-commit: 7b4722964d21c994e0fdf36c0d7f5b0dc703a9c2
2018-02-14 11:13:54 -08:00
Marek Grabowski 25b054a72f generated
Kubernetes-commit: fb7101ef7c9892e0a5d3a718038b93e84b9314b5
2018-02-14 16:15:12 +00:00
Wojciech Tyczynski 107aca480b Store labels and fields with object
Kubernetes-commit: 87a65b6c93db554bc91001df182672703e85edd8
2018-02-14 15:39:51 +01:00
David Eads bf5feefec3 add an admission decorator chain
Kubernetes-commit: 1ae856484b8a827b7ce6018ddfa103493a2cb97d
2018-02-14 09:27:25 -05:00
Mike Danese b53d508746 godeps: bump go-openapi
Kubernetes-commit: 1e90823c3b7877fd3207703b6c9ec635d0427c03
2018-02-13 18:30:26 -08:00
Kubernetes Publisher 707f691339 Merge pull request #59492 from dims/remove-old-keystone-authenticator
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 experimental keystone authenticator

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

experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559c5c0ab8a2e50b1ee11cc62f9ebb3a8

So we don't need this older style / hard coded / experimental code
anymore.

**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
kube-apiserver: the experimental in-tree Keystone password authenticator has been removed in favor of extensions that enable use of Keystone tokens.
```

Kubernetes-commit: 2a8049890af44ed2a665362766b14b7fd448226e
2018-02-14 02:11:53 +00:00
Kubernetes Publisher 66da060b9e Merge pull request #59582 from sttts/sttts-ctrl-mgr-auth
Automatic merge from submit-queue (batch tested with PRs 59653, 58812, 59582, 59665, 59511). 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>.

controller-manager: switch to options+config pattern and add https+auth

This PR switch the {kube,cloud}-controller-managers to use the Options+Config struct pattern for bootstrapping, as we use it throughout all apiservers. This allows us to easily plug in https and authn/z support.

Fixes parts of https://github.com/kubernetes/kubernetes/issues/59483

This is equivalent to https://github.com/kubernetes/kubernetes/pull/59408 after squashing.

```release-note
Deprecate insecure HTTP port of kube-controller-manager and cloud-controller-manager. Use `--secure-port` and `--bind-address` instead.
```

Kubernetes-commit: bd6b71d015b86f83a7d6cf633ab3b6894387a6ec
2018-02-13 22:12:48 +00:00
Kubernetes Publisher 94e4f73600 Merge pull request #56478 from hzxuzhonghu/fix-admissionregistration
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>.

admissionregistration use shared informer instead of poll

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

poll with 1s interval influence apiserver's performance

**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 #56357

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 46df8313511806c3c4263af336284fa4301cb634
2018-02-13 18:11:32 +00:00
Kubernetes Publisher efefe35115 Merge pull request #59779 from timothysc/timothysc
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 myself (timothysc) from OWNERS files on areas that I do not maintain

I do not actively participate in api-machinery, so I'm removing myself from the OWNERS files.

/cc @ncdc

Kubernetes-commit: f61b4a4e4a4aebb771caa0d3f38236713343140e
2018-02-13 18:10:57 +00:00
Kubernetes Publisher 9ed127b46b Merge pull request #58937 from hzxuzhonghu/pass-listener
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>.

pass listener in integration test

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

pass listener to `SecureServingOptions` to prevent port in use flake.
partially fix #58936

**Special notes for your reviewer**:

/assign @liggitt @sttts @caesarxuchao

**Release note**:

```release-note
NONE
```

Kubernetes-commit: da0e30a278ed61ccd1d2e42c19c0f154c85eafaf
2018-02-13 18:10:56 +00:00
Kubernetes Publisher 4d11630801 Merge pull request #55306 from hzxuzhonghu/audit
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>.

Audit support resource wildcard matching

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

audit policy support "resource/subresources" wildcard matching "resource/*", "*/subresource","*"

**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 #55305

**Special notes for your reviewer**:

**Release note**:

```release-note
[advanced audit] support subresources wildcard matching.
```

Kubernetes-commit: 10f2544ec80e176faad73c5025d7c16ffb8284b4
2018-02-13 14:11:27 +00:00
Timothy St. Clair b04a226adf Remove myself (timothysc) from OWNERS files on areas that I do not
actively maintain.

Kubernetes-commit: da77826d085814f753af8dc4a24b24f41aded74a
2018-02-12 18:56:41 -06:00
mbohlool cf2d943a15 Update bazel
Kubernetes-commit: 9e94cf72a8218911ea5e90a50a3d403755edbb04
2018-02-12 11:17:16 -08:00
Marek Grabowski e36f8069aa Add a metric exposing number of objects per type
Kubernetes-commit: f6e9ebffa2df10f7792fbea0a0fbe5ab8e388a26
2018-02-12 15:58:57 +00:00
Wang Guoliang c26e7f2e3a more concise to merge the array
Kubernetes-commit: 31aad75316b6e63840ec05b8bc9205fbb6d897aa
2018-02-11 21:27:11 +08:00
Wang Guoliang 156ee1e04e should use time.Since instead of time.Now().Sub
Kubernetes-commit: 89669283fe84619f0c15af8495ccb28a752bb1e8
2018-02-11 21:17:00 +08:00
Wang Guoliang 32fe314a1e fix some syntax related errors
Kubernetes-commit: d065157dd74fa02eec87f5849528b079a3736c3d
2018-02-11 19:50:49 +08:00
Kubernetes Publisher 16f07649a0 Merge pull request #59464 from dixudx/fix_all_typos
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 all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

**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**:
/sig testing
/area test-infra
/sig release
/cc @ixdy
/assign @fejta

**Release note**:

```release-note
None
```

Kubernetes-commit: 317853c90c674920bfbbdac54fe66092ddc9f15f
2018-02-11 09:19:06 +00:00
Ryan Hitchman 43796a9895 Fix build tag for grpc_service_unix_test.go.
Kubernetes-commit: 4d2e43f53f3c057e7bddd6f09e5a82b0b97d276f
2018-02-09 12:10:25 -08:00
Kubernetes Publisher ebeb23c0ad Merge pull request #57682 from nikhita/customresource-metrics
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>.

Collect prometheus metrics for custom resources

Enables apiserver metrics for custom resources.

Fixes #55146

**Release note**:

```release-note
Enable apiserver metrics for custom resources.
```

/cc sttts deads2k kargakis brancz

Kubernetes-commit: 8eae0a8a376bc9a7c705784b2a1c4e0a133654b9
2018-02-09 13:15:37 +00:00
Kubernetes Publisher a78ce9fc2a Merge pull request #55684 from wu-qiang/kms-plugin-grpc-api
Automatic merge from submit-queue (batch tested with PRs 58437, 59490, 55684). 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>.

gRPC-based KMS plugin service

**What this PR does / why we need it**:
Implement for issue https://github.com/kubernetes/kubernetes/issues/51965
**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 #51965

**Special notes for your reviewer**:
@destijl @sakshamsharma @deads2k @ericchiang
The implementation based on the document https://docs.google.com/document/d/1S_Wgn-psI0Z7SYGvp-83ePte5oUNMr4244uanGLYUmw/edit
**Release note**:

```release-note
Implement envelope service with gRPC, so that KMS providers can be pulled out from API server.
```

Kubernetes-commit: 53207e1be629e69cade08ec7093baef8c51c51cd
2018-02-09 09:15:16 +00:00
Di Xu 9beeb59216 fix all the typos across the project
Kubernetes-commit: 48388fec7eaad4ac8d84fbe20673ffacf41964a1
2018-02-09 14:53:53 +08:00
Wu Qiang 43cefec1d0 Update endpoint value in test code
Kubernetes-commit: 31f74303fc48df5d88105c9742a103eae742f478
2018-02-09 01:23:25 +00:00
Dr. Stefan Schimanski 89b7bf377a Update generated files
Kubernetes-commit: 5483ab7679dd055422131fd1c22a18eee39a775e
2018-02-08 19:37:08 +01:00
Kubernetes Publisher 8e45eac9df Merge pull request #58867 from hzxuzhonghu/fix-cors-test-bug
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 using defer in loop in cors test

**What this PR does / why we need it**:
fix bug in cors test

**Special notes for your reviewer**:
a small bug fix, wrap defer in a closure
**Release note**:

```release-note
NONE
```

Kubernetes-commit: b5387effe82f94ebc13fc5a924f0d389e8600bf0
2018-02-08 17:15:56 +00:00
Dr. Stefan Schimanski 0520d284e2 controller-manager: add authz/n to options, nil by default
Kubernetes-commit: cecd663c21d139a3a5a15b43a8dda8de26180246
2018-02-08 14:19:02 +01:00
Kubernetes Publisher 7b3fec31ba Merge pull request #59410 from fisherxu/testapigroup
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). 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 some package to code-generator

**What this PR does / why we need it**:
add some package to code-generator and regenerated files.

**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**:
/cc @sttts

**Release note**:

```release-note
NONE
```

Kubernetes-commit: b309c2f4f034dc5a73f9258199d2359d3f6ec81d
2018-02-08 13:16:03 +00:00