Commit Graph

139 Commits

Author SHA1 Message Date
Kubernetes Publisher
ef93e2e76a Merge pull request #85305 from codenrhoden/remove-mount-pkg
Remove pkg/util/mount (moved out of tree)

Kubernetes-commit: 45e0080fd5883e3355233c9c22fa5bf242d525dd
2019-11-15 22:10:02 +00:00
Travis Rhoden
b3ad0016ff Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.

Kubernetes-commit: 0c5c3d8bb97d18a2a25977e92b3f7a49074c2ecb
2019-11-14 13:30:00 -07:00
Kubernetes Publisher
055fb85f0a Merge pull request #84424 from mikedanese/expcache
Add an expiring cache for the caching token authenticator

Kubernetes-commit: 19b4017b5d5c5695403a9804f5ea3de11a436c04
2019-11-15 02:06:46 +00:00
Kubernetes Publisher
33e2132d1e Merge pull request #85175 from liggitt/golang-org-comments
Add comments to explain golang.org replace directives

Kubernetes-commit: 24334444b46371e26594e1f6e594195a761b53d3
2019-11-14 22:25:29 +00:00
Jordan Liggitt
424188e943 Add comments to explain golang.org replace directives
Kubernetes-commit: 9f40e19d7ac9e2203c23814701468a26eee1964f
2019-11-12 23:54:26 -05:00
Kubernetes Publisher
de0ba49f28 Merge pull request #83840 from liggitt/json-iter
bump json-iterator dependency

Kubernetes-commit: 3387d6cfc73235fd554e5039b85abb7700eaf126
2019-11-09 11:01:50 +00:00
Kubernetes Publisher
cb8e37036c Merge pull request #84911 from yue9944882/chore/bump-kube-openapi
Pin kube-openapi vendor to 30be4d16710a

Kubernetes-commit: dd6faa5da791c06fa23ff668e4463c3ad2b23340
2019-11-08 07:15:22 +00:00
yue9944882
7b8c63153b update k8s.io/kube-openapi to 30be4d16710a
Kubernetes-commit: 8e7606f32898b294fc25152ff8bd34f62d6221d3
2019-11-07 18:39:08 +08:00
Kubernetes Publisher
97ea7f1bbd Merge pull request #82809 from liggitt/go-1.13-no-modules
update to use go1.13.4

Kubernetes-commit: 695c3061dd92a6b6950f8adf0341ceb4a8dd44d7
2019-11-07 03:24:42 +00:00
Jordan Liggitt
fe7e76b7d4 hack/update-vendor.sh
Kubernetes-commit: 297570e06a88db23e16dbdbf6ce3173fe0ae376c
2019-11-05 14:11:10 -05:00
Kubernetes Publisher
472018681a Merge pull request #84604 from codenrhoden/update-utils-dep
Update k8s.io/utils dependency to latest

Kubernetes-commit: 97e28edb6620568d985f3b03b495a0a373aa8750
2019-11-01 23:13:24 +00:00
Travis Rhoden
09364c09e9 Update k8s.io/utils dependency to latest
Kubernetes-commit: 81f66ecbb5ff359ac765c7f332289dd8c1737c39
2019-10-31 08:35:01 -06:00
Mike Danese
326f8f2c88 Add an expiring cache for the caching token authenticator
And maybe the webhook authorizer cache.

This cache has two primary advantages over the LRU cache used currently:

- Cache hits don't acquire an exclusive lock.
- More importantly, performance doesn't fallover when the access pattern
  scans a key space larger than an arbitrary size (e.g. the LRU
  capacity).

The downside of using an expiring cache here is that it doesn't have a
maximum size so it's suspectible to DoS when the input is user
controlled. This is not the case for successful authentications, and
successful authentications have a natural expiry so it might be a good
fit here.

It has some a few differences compared to:

3d7318f29d/staging/src/k8s.io/client-go/tools/cache/expiration_cache.go

- Expiration is not entirely lazy so keys that are never accessed again
  are still released from the cache.
- It does not acquire an exclusive lock on cache hits.
- It supports per entry ttls specified on Set.

The expiring cache (without striping) does somewhere in between the
simple cache and striped cache in the very contrived contention test
where every iteration acquires a write lock:

```
$ benchstat simple.log expiring.log
name      old time/op    new time/op    delta
Cache-12    2.74µs ± 2%    2.02µs ± 3%  -26.37%  (p=0.000 n=9+9)
name      old alloc/op   new alloc/op   delta
Cache-12      182B ± 0%      107B ± 4%  -41.21%  (p=0.000 n=8+9)
name      old allocs/op  new allocs/op  delta
Cache-12      5.00 ± 0%      2.00 ± 0%  -60.00%  (p=0.000 n=10+10)

$ benchstat striped.log expiring.log
name      old time/op    new time/op    delta
Cache-12    1.58µs ± 5%    2.02µs ± 3%  +27.34%  (p=0.000 n=10+9)
name      old alloc/op   new alloc/op   delta
Cache-12      288B ± 0%      107B ± 4%  -62.85%  (p=0.000 n=10+9)
name      old allocs/op  new allocs/op  delta
Cache-12      9.00 ± 0%      2.00 ± 0%  -77.78%  (p=0.000 n=10+10)

$ benchstat simple.log striped.log expiring.log
name \ time/op    simple.log   striped.log  expiring.log
Cache-12          2.74µs ± 2%  1.58µs ± 5%   2.02µs ± 3%
name \ alloc/op   simple.log   striped.log  expiring.log
Cache-12            182B ± 0%    288B ± 0%     107B ± 4%
name \ allocs/op  simple.log   striped.log  expiring.log
Cache-12            5.00 ± 0%    9.00 ± 0%     2.00 ± 0%
```

I also naively replacemed the LRU cache with the expiring cache in the
more realisitc CachedTokenAuthenticator benchmarks:

https://gist.github.com/mikedanese/41192b6eb62106c0758a4f4885bdad53

For token counts that fit in the LRU, expiring cache does better because
it does not require acquiring an exclusive lock for cache hits.

For token counts that exceed the size of the LRU, the LRU has a massive
performance drop off. The LRU cache is around 5x slower (with lookups
taking 1 milisecond and throttled to max 40 lookups in flight).

```
$ benchstat before.log after.log
name                                                  old time/op    new time/op    delta
CachedTokenAuthenticator/tokens=100_threads=256-12      3.60µs ±22%    1.08µs ± 4%  -69.91%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=500_threads=256-12      3.94µs ±19%    1.20µs ± 3%  -69.57%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=2500_threads=256-12     3.07µs ± 6%    1.17µs ± 1%  -61.87%  (p=0.000 n=9+10)
CachedTokenAuthenticator/tokens=12500_threads=256-12    3.16µs ±17%    1.38µs ± 1%  -56.23%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=62500_threads=256-12    15.0µs ± 1%     2.9µs ± 3%  -80.71%  (p=0.000 n=10+10)

name                                                  old alloc/op   new alloc/op   delta
CachedTokenAuthenticator/tokens=100_threads=256-12        337B ± 1%      300B ± 0%  -11.06%  (p=0.000 n=10+8)
CachedTokenAuthenticator/tokens=500_threads=256-12        307B ± 1%      304B ± 0%   -0.96%  (p=0.000 n=9+10)
CachedTokenAuthenticator/tokens=2500_threads=256-12       337B ± 1%      304B ± 0%   -9.79%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=12500_threads=256-12      343B ± 1%      276B ± 0%  -19.58%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=62500_threads=256-12      493B ± 0%      334B ± 0%  -32.12%  (p=0.000 n=10+10)

name                                                  old allocs/op  new allocs/op  delta
CachedTokenAuthenticator/tokens=100_threads=256-12        13.0 ± 0%      11.0 ± 0%  -15.38%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=500_threads=256-12        12.0 ± 0%      11.0 ± 0%   -8.33%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=2500_threads=256-12       13.0 ± 0%      11.0 ± 0%  -15.38%  (p=0.000 n=10+10)
CachedTokenAuthenticator/tokens=12500_threads=256-12      13.0 ± 0%      10.0 ± 0%  -23.08%  (p=0.000 n=9+10)
CachedTokenAuthenticator/tokens=62500_threads=256-12      17.0 ± 0%      12.0 ± 0%  -29.41%  (p=0.000 n=10+10)
```

Benchmarked with changes in #84423

Bugs: #83259 #83375

Kubernetes-commit: 9167711fd18511ffc9c90ee306c462be9fc7999b
2019-10-26 12:19:07 -07:00
Kubernetes Publisher
d7b8b83029 Merge pull request #83987 from wenjiaswe/etcd_client_3_4_2
Update etcd client to v3.4.3 in k8s v1.17

Kubernetes-commit: 09f453ff8322979ed5a7611bc2e5528506c1fc7f
2019-10-25 23:13:05 +00:00
Wenjia Zhang
2ea1ad4d72 Pin dependencies and update vendors
Kubernetes-commit: 660b17d0aeda96af94defd4c5110d9fef523d52b
2019-10-23 13:37:36 -07:00
Kubernetes Publisher
ab9e95689d Merge pull request #82455 from AdheipSingh/patch-1
Update comment for syncHandler

Kubernetes-commit: ad0274fb6e506fb573cc3237ada871ea6dfc66fe
2019-10-17 07:04:49 +00:00
Kubernetes Publisher
2b8cca0f69 Merge pull request #81952 from ialidzhikov/fix/broken-link
Fix broken link in sample-controller

Kubernetes-commit: d87403c2f5c4a49b15420985e7c6d5cbd1e9cd8b
2019-10-16 11:28:52 +00:00
Kubernetes Publisher
8aa6dce7d6 Merge pull request #83785 from yastij/bump-utils-rangesize
bump k8s.io/utils to pickup bug fix for rangesize func

Kubernetes-commit: 677903edc6cfe1fb045a55b0734ee05ce8c3d03c
2019-10-14 07:34:41 +00:00
Jordan Liggitt
32837242dd bump github.com/json-iterator/go v1.1.8
Kubernetes-commit: e323279ab94e2434fa610a476ad6d7630228be0e
2019-10-12 10:10:03 -04:00
Yassine TIJANI
97f7067723 bump k8s.io/utils to pickup bug fix for rangesize
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: 5d49cbd3cae68d7aafdeac7f2ca08208118f09ad
2019-10-11 16:45:21 +02:00
Kubernetes Publisher
ac9726f261 Merge pull request #82176 from pohly/ginkgo-stack-fix
Ginkgo update + stack fix

Kubernetes-commit: b140b431073ae4d84ce9ef5e01a1f27058178ead
2019-10-05 12:09:43 +00:00
Kubernetes Publisher
9f91627dc6 Merge pull request #83261 from liggitt/yaml-limits
limit yaml/json decode size

Kubernetes-commit: 4afcba42bed2bb7c36e5209a90d87343f32a0efa
2019-10-03 04:11:42 +00:00
Jordan Liggitt
1be1e75737 bump gopkg.in/yaml.v2 v2.2.4
Kubernetes-commit: 8aeffa8716dcf986544df74444264ef639d61a7a
2019-10-02 14:46:08 -04:00
Kubernetes Publisher
a91ecd8a9f Merge pull request #83113 from yastij/bump-utils
bump k8s.io/utils to pickup ipallocator changes

Kubernetes-commit: 28bcf55accc52dfd4fde5f603a5784c40c485528
2019-09-26 00:08:56 +00:00
Yassine TIJANI
e6f28640db bump k8s.io/utils to pickup ipallocator changes
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: 16fe4d76271f6330c2837462a40edf95dde95942
2019-09-25 16:15:30 +02:00
Kubernetes Publisher
9776085a84 Merge pull request #83014 from danielqsj/bump-klog
Bump k8s.io/klog to v1.0.0

Kubernetes-commit: b7003211d5454982401c19705f73bf2820ede855
2019-09-23 16:09:22 +00:00
danielqsj
20bcce4d81 Bump k8s.io/klog to v1.0.0
Kubernetes-commit: c2a4906152e67a45308f988aa2cb8b76b4503855
2019-09-23 16:51:43 +08:00
Kubernetes Publisher
3b7fd8b5d4 Merge pull request #81944 from carlory/fix-vendor
fix static check failures in staging  pkg

Kubernetes-commit: 84d484bd2c6c69e9ccce1fe03b7621f151b1b042
2019-09-16 16:06:09 +00:00
Kubernetes Publisher
b2dd2e61ff Merge pull request #82161 from d-kuro/feature/fix-broken-link
Fix broken link.

Kubernetes-commit: 9c25981f359603333b3323b44e812b293887749b
2019-09-13 08:41:32 +00:00
Kubernetes Publisher
b17b22266f Merge pull request #77354 from jennybuckley/crd-apply
Use CRD validation field in server-side apply

Kubernetes-commit: ab162cd28c332d0ecfb4f918d5f91e9e57acdb61
2019-08-31 08:01:03 +00:00
jennybuckley
4696ad80ce Update generated
Kubernetes-commit: badd5b9a26026138e4fc44a643ec1c6b65a7891b
2019-08-29 19:10:28 -07:00
Kubernetes Publisher
25b34fa161 Merge pull request #81871 from prameshj/vendor-update
Update vendor k8s-cloud-provider and google API

Kubernetes-commit: 91bec13163b18238a8ed3d9b872cd27b1193077d
2019-08-28 12:01:28 +00:00
Patrick Ohly
63288e8e88 e2e log: fix full stacktrace with Ginkgo 1.10.0
Ginkgo 1.10.0 includes the relevant fix for dumping the full stack
(https://github.com/onsi/ginkgo/pull/590), so when using that release
we can simplify the logging unit test.

By changing the skipping, we can avoid the rather volatile util.go
entries. However, that gomega is part of the stack trace still needs
to be fixed in Gingko.

Kubernetes-commit: 02ce619078b1a75e9fa258e101f81af899719e8e
2019-08-27 14:22:46 +02:00
Pavithra Ramesh
da203f3b6d Update vendor k8s-cloud-provider and google API
Ran commands:
hack/pin-dependency.sh github.com/GoogleCloudPlatform/k8s-cloud-provider 27a4ced34534a6c32b63159b100ac0efaa1d37b3
hack/update-vendor.sh

hack/pin-dependency.sh google.golang.org/api 5213b809086156e6e2b262a41394993fcff97439
hack/update-vendor.sh

hack/verify-vendor.sh

merge conflicts

Kubernetes-commit: ce3b145e7369da6c1179346a4e6f4f9992d235b7
2019-08-23 15:51:45 -07:00
Kubernetes Publisher
8df6f90ea0 Merge pull request #81752 from dims/hack-pick-up-test-go-files-in-verify-import-boss
Pick up *_test.go in verify-import-boss

Kubernetes-commit: 448049927b7b66d3b539f228ed6eac59430ea70b
2019-08-26 12:18:44 +00:00
Davanum Srinivas
d374f88b72 hack/pin-dependency.sh k8s.io/gengo 26a664648505d962332bda642b27306bc10d1082
Kubernetes-commit: 96998c619714f254998e69c5bae3c3a1b03fa423
2019-08-22 12:15:10 -04:00
Kubernetes Publisher
ec1b9e1d84 Merge pull request #81189 from tallclair/staticcheck-verify
Add verify-staticcheck script

Kubernetes-commit: 39c10d1550d63a4a5c585600507ffd6a0f157267
2019-08-20 10:38:33 +00:00
Tim Allclair
44debde540 Bump golang.org/x/tools version for staticcheck compat
Kubernetes-commit: 9a02ef7fe5eb166a53131c52b59844179c4158e9
2019-08-08 11:04:56 -07:00
Kubernetes Publisher
87c4b6f0a4 Merge pull request #79574 from justaugustus/azure-sdk-bump
Azure SDK updates (6/30/19)

Kubernetes-commit: 1ff4525a29f1736fca19e10b49e42664b29010c2
2019-08-16 10:34:50 +00:00
Stephen Augustus
098a911418 Update Azure/azure-sdk-for-go and Azure/go-autorest modules
Signed-off-by: Stephen Augustus <saugustus@vmware.com>

Kubernetes-commit: db855f9ba0ced2303fbb3b9776dd2a0d78b31897
2019-08-15 17:57:49 -04:00
Kubernetes Publisher
f27ac7da6c Merge pull request #81335 from carlory/fix
add missing import required by build scripts

Kubernetes-commit: 8d925c7510820523665bdd5ce1916fa956b9c5fa
2019-08-14 14:19:25 +00:00
Kubernetes Publisher
a378495b96 Merge pull request #81394 from cblecker/golang-deps
Update golang/x/net dependency

Kubernetes-commit: 1f6cb3cb9def97320a5412dcbea1661edd95c29e
2019-08-14 10:44:47 +00:00
Christoph Blecker
ab1a85cb44 Update vendor
Kubernetes-commit: 5f971d6d8862de319edbd24a729a704292c560dc
2019-08-13 17:51:45 -07:00
Kubernetes Publisher
0ad63590ca Merge pull request #81372 from alvaroaleman/bump-sets
Bump gengo to have set insert|delete return the set

Kubernetes-commit: 125fb72850c4d1e7b25bd46a094633b9a0a76b9b
2019-08-14 02:18:20 +00:00
Alvaro Aleman
0b8b985912 Update k8s.io/gengo to 955ffa8fcfc983717cd9de5d2a1e9f5c465f4376
Kubernetes-commit: c4fd0d4f99b672f8c44ff72a155973fae4b32032
2019-08-13 23:49:12 +02:00
Kubernetes Publisher
20ed9a6dcb Merge pull request #81164 from dims/update-to-latest-klog-0.4.0
Update to latest klog 0.4.0

Kubernetes-commit: 461b2d8b9ae818b4b08a6c74d2ec6048fe7a52b6
2019-08-13 22:22:31 +00:00
carlory
5fae6ff24f run ./hack/update-vendor.sh
Kubernetes-commit: dc9bf6a9553d2381ae94e62ad5e49064d0de01e7
2019-08-13 20:20:38 +08:00
Kubernetes Publisher
a52d0d8c67 Merge pull request #81096 from roycaihw/update-vendor-json-iterator
Update github.com/json-iterator/go dependency to fix emtpy byte marshaling

Kubernetes-commit: 3030a9d92750173ed72ea9cd37286bf6a41c2dcb
2019-08-08 18:21:25 +00:00
Davanum Srinivas
49c7e07bcf Update to latest klog 0.4.0
47ffc4e Add test case for detecting data race
959d342 Prevent data race in SetOutput* methods
34123a4 Test with golang 1.12.x
bf4884f Fix the log duplication issue for --log-file
dc5546c Backfill integration tests for selecting log destinations
baef93d fix broken links
07b218b Add go modules files
b33ae69 Add flag to include file's dir in logs
7c58910 correct documentation
a4033db Code Hygene - glog to klog
941d47b Revert "Fix the log duplication issue for --log-file."
314f6c4 Update godoc for the default value of logtostderr
7eb35e2 Fix the log duplication issue for --log-file.

Kubernetes-commit: 9a2de95601641aa1077734c76fc24ebe7b6026db
2019-08-08 10:08:27 -04:00
Haowei Cai
3f68520957 generated
running hack/update-vendor.sh

Kubernetes-commit: 6bed35ebd2bfc8d0de1d5fe7a6db0fd15a7abace
2019-08-07 12:53:51 -07:00