Commit Graph

62 Commits

Author SHA1 Message Date
Ted Yu 7e547519cf Add note on the role of BenchmarkSimpleCache
Kubernetes-commit: dd48a022c063e9f507ff62e1796a273d38036cb4
2019-09-11 14:39:57 -07:00
Han Kang 3e6e1db500 add some documentation around the metrics stability migration changes for clarity
Kubernetes-commit: 4e5d906c4d008f914b0ede26ea91533d6343dec5
2019-08-26 19:15:30 -07:00
Han Kang b9084e350a migrate kube-apiserver metrics to stability framework
Kubernetes-commit: 466980dd747e06e55451301c624eecccfa505123
2019-08-22 15:38:42 -07:00
Clayton Coleman 49ac3bd853 Avoid allocating when performing VisitRulesFor on service accounts
Service account authorization checks are done frequently and were
observed to perform 7% of allocations on a system running e2e tests.
The allocation comes from when we walk the authorization rules to
find matching service accounts.

Optimize the check for service account names to avoid allocating.

Kubernetes-commit: 4c87a14e6b1809359fcb6566d883a169ff0db259
2019-03-11 11:50:44 -04:00
Max Leonard Inden 041b1f1718 src/k8s.io/apiserver: Increase cert expiration histogram resolution
The `certificate_expiration_seconds` histogram measures the remaining
time of client certificates used to authenticate to the API server. It
records the lifetime of received client request certificates in buckets
of 6h, 12h, ..., 1y.

In environments with automated certificate rotation it is not uncommen
to have issued certificates expire in less than the above mentioned
minimum bucket of 6h. In such environments the above histogram is
useless given that every request will be recorded in the first bucket.

This patch increases the histogram resolution by adding a 30m, 1h and 2h
bucket. Prometheus histogram buckets are cummulative, e.g. the 12h
bucket is counting _all_ records with an expiration date lower or equal
to 12h including _all_ requests of the 6h bucket. Thereby this patch
does not break existing monitoring setups.  This histogram is exposed
once per API server, thereby the 3 additional time series do not cause a
cardinality issue.

Kubernetes-commit: f90bbc3d6bfba992831eb216161990eae1098ae5
2019-03-01 11:34:38 +01:00
Xiang Dai ca6fc75dff delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>

Kubernetes-commit: 36065c6dd717c14e0a90131041e20345a7e5e324
2019-02-22 09:43:51 +08:00
Roy Lenferink 4c9524b9fb Updated OWNERS files to include link to docs
Kubernetes-commit: b43c04452f3b563473b5c2a765d4ac18cc0ff58f
2019-01-30 20:05:00 +01:00
Zhang-hoon Dennis Oh dfaa27e10c Update two doc.go files under staging/src/k8s.io/apiserver
Signed-off-by: Zhang-hoon Dennis Oh <zhanghoondennisoh@gmail.com>

Kubernetes-commit: f48480953e00f39e108833fd88a1d614459053a7
2018-10-11 19:10:16 +09:00
Mike Danese ae00afc213 patch webhook authenticator to support token review with arbitrary audiences
Kubernetes-commit: effad15ecc373beb46afd2915827247da51f399d
2018-10-29 20:45:10 -07:00
Davanum Srinivas 2710b17b80 Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135

Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
2018-11-09 13:49:10 -05:00
Jordan Liggitt b5314974ae certificates subproject approvers/reviewers
Kubernetes-commit: 4ebe084376610b88b0ac446b59ef537adcee51e3
2018-11-02 14:11:01 -04:00
Jordan Liggitt 6320ce44cc authenticators subproject approvers/reviewers
Kubernetes-commit: 4fa2a0cc8a86a5d322e52c43eb7d5ffe36b7887f
2018-11-02 13:36:47 -04:00
Mike Danese 0bf5dcd764 remove webhook cache implementation and replace with the token cache
The striped cache used by the token cache is slightly more sophisticated
however the simple cache provides about the same exact behavior. I used
the striped cache rather than the simple cache because:

* It has been used without issue as the primary token cache.
* It preforms better under load.
* It is already exposed in the public API of the token cache package.

Kubernetes-commit: 0ec4d6d396f237ccb3ae0e96922a90600befb83d
2018-10-30 12:41:46 -07:00
Mike Danese 89bdd8bce5 create audience unaware authenticator wrappers
Kubernetes-commit: c704d70d49bb9799674d84aecb2a49afb6512e11
2018-10-16 20:57:37 -07:00
Mike Danese 1692373df9 move audience context functions to authenticator package
Kubernetes-commit: 817cf70191b73d1ee9f4e7af83089e5854e5131d
2018-10-31 14:50:11 -07:00
Mike Danese 7c1e7ec029 echo audiences in anonymous and insecure authenticators
part of https://github.com/kubernetes/kubernetes/issues/69893

Kubernetes-commit: f94bc6193e1e299b1cb258b59504fab81cf8da1c
2018-10-26 15:29:55 -07:00
Mike Danese 908a04653f make token cache include audience in hash key
Kubernetes-commit: 809f278b032103cd24fcbb5ea2196c6c7caa6f63
2018-10-16 10:02:01 -07:00
Mike Danese 2ced48ac6e rebase authenticators onto new interface.
Kubernetes-commit: e5227216c0796d725c695e36cfc1d54e7631d3a6
2018-10-15 15:17:36 -07:00
Mike Danese b411a20b15 tokenreview: authenticator interface changes
Kubernetes-commit: 11be17175798773a1011afad8d0a9119254e728c
2018-10-09 10:22:06 -07:00
Mike Danese adddd63698 add some helpers to Audiences to find intersecting audiences
Kubernetes-commit: 01ce5bb8a470280d1a8ce68d5b2b4f1b2ac283cf
2018-10-16 20:01:58 -07:00
Mike Danese 37ab80320b tokenreview: add APIAudiences config to generic API server and augment context
Kubernetes-commit: 21fd8f204128a7847786927b460d95be34a6dbde
2018-10-09 22:04:52 -07:00
David McCormick a948ad1df7 Remove excessive warnings with x509 certificate auth
Suppress common name verify warning log and roll up into returned error

remove glog test dependency

Kubernetes-commit: bb3124c48a4d276ed280175e5825ea9db022d699
2018-09-24 17:15:27 +01:00
Dr. Stefan Schimanski 16d4968bf9 authn/z: optionally opt-out of mandatory authn/authz kubeconfig
Kubernetes-commit: a671d65673590f0dfcf5c2b673e1518d11510bdb
2018-08-22 11:56:07 +02:00
Jake Sanders 41bff9cd5e Escape illegal characters in remote extra keys
Signed-off-by: Jake Sanders <jsand@google.com>

Kubernetes-commit: f35e3d07c9898f8ec156209a868fa4451eb9afe2
2018-07-03 21:19:15 -07:00
Jordan Liggitt 524198321e Remove unused x509 code
Kubernetes-commit: 82f603c3274e3a1c2927a019670ec17f15281a28
2018-07-10 13:22:24 -04:00
Kubernetes Publisher 627fa76a8b sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:38:17 +00:00
Wang Guoliang 32fe314a1e fix some syntax related errors
Kubernetes-commit: d065157dd74fa02eec87f5849528b079a3736c3d
2018-02-11 19:50:49 +08:00
Jeff Grafton 1ab12b2dc8 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08:00
Jeff Grafton c8a97ee31a Autogenerate BUILD files
Kubernetes-commit: efee0704c60a2ee3049268a41535aaee7f661f6c
2017-12-23 13:06:26 -08:00
Mike Danese c463eb3137 certs: add month buckets
Kubernetes-commit: e08c98b171ff9dd3982377103f9e43c311c7a78d
2017-11-27 10:59:56 -08:00
hzxuzhonghu c79bc73664 verify token file
Kubernetes-commit: 62c170fc1da2a94cd4dacd56f8f798f491b29ae1
2017-11-10 11:30:51 +08:00
Jeff Grafton f4dbe23125 update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
Jeff Grafton eabf5a2c6e Use buildozer to delete licenses() rules
Kubernetes-commit: 02fb4200dcdf8636eac5953d04b2c4af912f443b
2017-09-21 14:54:29 -07:00
Jeff Grafton ecbbfb0461 Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 532bd482dfbe25c6fc970d2175f7e02fec2fc8c0
2017-09-21 14:53:56 -07:00
Cao Shufeng 81eb3429e7 remove useless argument "name"
Kubernetes-commit: 2e97611bc62b88c48777d6209a0ed28d17d0e52d
2017-08-29 13:16:16 +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
Jordan Liggitt be8f046a0c Add union token authenticator
Kubernetes-commit: 4fd8196cf56aa7884f5a385017b2be651a259e59
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
Jordan Liggitt dcfd8acc4d Add token group adder component
Kubernetes-commit: 15d8509a711efa062a1357cf1cfb398ec6e91023
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
Jeff Grafton 6caa2933ae Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 13:15:24 +00:00
Jeff Grafton 44942b068a Run hack/update-bazel.sh to generate BUILD files
Kubernetes-commit: 3579017b865ddbc5449d6bba87346f086e4b93ff
2017-08-29 13:13:51 +00:00
John Millikin 431caeab63 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.

Kubernetes-commit: 0acdc0cdb369372e06c202aea162bce04410f643
2017-07-28 13:56:11 +00:00
Haoran Wang da548f4af1 fix error type
Kubernetes-commit: 45ec7d9f51c54c8312579c9a0eab83c29d6d7d06
2017-07-05 23:59:23 +00:00
Jordan Liggitt 6a99774546 Use websocket protocol authenticator in apiserver
Kubernetes-commit: 6a872c09ebc8bff4efccc6d0206b0b5639be31ae
2017-06-28 00:14:31 +00:00
Jordan Liggitt 5c2f76950a Add websocket protocol authentication method
Kubernetes-commit: e2a03bcf2a568b5c40e8f92e1009440038f5e5ee
2017-06-28 00:14:31 +00:00
deads2k 9250b02a30 remove bearer token from headers after we consume it
Kubernetes-commit: 641b83877a5bd01f87f3e4db53917e854b581be7
2017-05-12 17:30:08 +00:00
Mike Danese fda6fe0d70 add testdata for tests in //vendor/k8s.io/...
Kubernetes-commit: 981dd8dc6615f397a9b85c5b965998dc8a0b1338
2017-04-15 20:35:23 +00:00
Mike Danese 2aab760a2a autogenerated
Kubernetes-commit: a05c3c0efdc5822049e34b1a5a1ee259c5fb1906
2017-04-15 20:35:23 +00:00
deads2k 4429450aca make the system:authenticated group adder smarter
Kubernetes-commit: 379a73a8dbd3aa09471eab3994861ad41f548ded
2017-03-18 19:56:09 +00:00