Commit Graph

3445 Commits

Author SHA1 Message Date
Kubernetes Publisher 586878aa9d Merge pull request #85285 from liggitt/kubectl-resource-version
Fix --resource-version handling in kubectl

Kubernetes-commit: 141329fd2157a0791b93fae0160ce24d99808607
2019-11-15 02:26:09 +00:00
Kubernetes Publisher 0f4ee8ce68 Merge pull request #85175 from liggitt/golang-org-comments
Add comments to explain golang.org replace directives

Kubernetes-commit: 24334444b46371e26594e1f6e594195a761b53d3
2019-11-14 22:52:35 +00:00
Kubernetes Publisher edc096cc0a Merge pull request #84227 from soltysh/fix_scale_doc
Drop job from scale description

Kubernetes-commit: 37c7c904e1f3730c8a1dc37c5428132a6af3a6f7
2019-11-14 22:52:33 +00:00
Christian Huffman fc490f462d Included FSType in CSI volumes
Kubernetes-commit: bbae978d4a0885a6135afb713e252ec4fa41a277
2019-11-14 11:18:40 -05:00
Jordan Liggitt 25e7825a5b Fix --resource-version handling in kubectl
Kubernetes-commit: 0ac8345d3a4c5ee38fd3fc2c40976ba876d815e7
2019-11-14 09:24:42 -05:00
Kubernetes Publisher c85971996e Merge pull request #84390 from robscott/endpointslice-beta
Promoting EndpointSlices to beta

Kubernetes-commit: 64f4be5b328a4df8a709b95604743086013a70e4
2019-11-14 11:33:28 +00:00
Jordan Liggitt 163af6a908 Add comments to explain golang.org replace directives
Kubernetes-commit: 9f40e19d7ac9e2203c23814701468a26eee1964f
2019-11-12 23:54:26 -05:00
Mike Danese f2f06b692c 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
Rob Scott 56eaaf1668 Promoting EndpointSlices to beta
Kubernetes-commit: a7e589a8c689d1a6c0c21d47c5e6c97267822875
2019-10-25 14:59:10 -07:00
Kubernetes Publisher b031036a44 Merge pull request #84971 from robscott/endpointslice-iptypes
Splitting IP address type into IPv4 and IPv6 for EndpointSlices

Kubernetes-commit: c5609071d805036b251f22ce122bbf13ca94bff7
2019-11-14 11:33:26 +00:00
Kubernetes Publisher 9aa870a398 Merge pull request #84194 from jackkleeman/describe-netpol
Fix incorrect message on describe netpol

Kubernetes-commit: b9030ff666772b76c6bb96c147a52341a9be94b9
2019-11-14 11:33:24 +00:00
Kubernetes Publisher 62986ac78f Merge pull request #85135 from wojtek-t/delete_unnecessary_conversions_1
Eliminate couple unnecessary conversions

Kubernetes-commit: 402e551ca27499a9dc211dd6e4eca21d9aa9d089
2019-11-14 11:33:22 +00:00
wojtekt 7f6186e3c1 Eliminate couple unnecessary conversions
Kubernetes-commit: 067d173266303c5c9a4281e962d3662c34a78053
2019-11-12 14:19:14 +01:00
Kubernetes Publisher 169c48cabb Merge pull request #85035 from gongguan/fix_diff_panic
fix kubectl diff panic

Kubernetes-commit: f610133f69f2d858a54361ab77f54eb74e145e70
2019-11-11 22:34:30 +00:00
Kubernetes Publisher afc56dffd2 Merge pull request #84692 from smarterclayton/protocol_errors
Fix watch negotiation when using a non-default mime type in the client

Kubernetes-commit: c28921f248a8e6c923096154c6e87efcc188b9f0
2019-11-11 06:53:37 +00:00
louisgong ae926dc56e fix kubectl diff panic
Kubernetes-commit: 4f13f2739a3a33c7ed4b86b98054972c0fde4579
2019-11-09 20:34:51 +08:00
Rob Scott 4118a67aeb Splitting IP address type into IPv4 and IPv6 for EndpointSlices
Kubernetes-commit: 0fa9981e0106d7f0d6f9c88fc49d4cdf779c95c1
2019-11-06 22:46:04 -08:00
Clayton Coleman 4ca8f5ecfe test: kubectl unit tests should be using codecs without conversion
Tests are also refactored to use the simpler RESTClient code path.

Kubernetes-commit: 8a9b8c87c40ee65751828d9dd02f4f642588f0ce
2019-11-03 15:20:10 -05:00
Kubernetes Publisher d44ed977fb Merge pull request #84562 from yutedz/drain-filter
Only put un-filtered pod in podDeleteList

Kubernetes-commit: 1aece964da3b008b2a1a83c5c6ee0acd8a696330
2019-11-09 12:02:37 +00:00
Kubernetes Publisher 7b7a54e29b Merge pull request #83840 from liggitt/json-iter
bump json-iterator dependency

Kubernetes-commit: 3387d6cfc73235fd554e5039b85abb7700eaf126
2019-11-09 12:02:35 +00:00
Kubernetes Publisher b6bc5b7411 Merge pull request #84612 from soltysh/set_typesetter
Set TypeSetter in get print flags, like we do everywhere else

Kubernetes-commit: 48ee1504445801c38b7679ecf419a0ba3472bfc6
2019-11-09 12:02:32 +00:00
Kubernetes Publisher 3aaffcce19 Merge pull request #78676 from i02sopop/kubectl_optimizations
Do some Kubectl optimizations suggested by the golangci linter

Kubernetes-commit: 81953bb4b417eb877efe4e94e98affb181863112
2019-11-08 15:30:02 +00:00
Kubernetes Publisher feacf2b3d4 Merge pull request #84911 from yue9944882/chore/bump-kube-openapi
Pin kube-openapi vendor to 30be4d16710a

Kubernetes-commit: dd6faa5da791c06fa23ff668e4463c3ad2b23340
2019-11-08 07:35:26 +00:00
yue9944882 9b51bd7d1e update k8s.io/kube-openapi to 30be4d16710a
Kubernetes-commit: 8e7606f32898b294fc25152ff8bd34f62d6221d3
2019-11-07 18:39:08 +08:00
Kubernetes Publisher 116445b61d Merge pull request #82809 from liggitt/go-1.13-no-modules
update to use go1.13.4

Kubernetes-commit: 695c3061dd92a6b6950f8adf0341ceb4a8dd44d7
2019-11-07 03:52:53 +00:00
Jordan Liggitt 543688855f hack/update-vendor.sh
Kubernetes-commit: 297570e06a88db23e16dbdbf6ce3173fe0ae376c
2019-11-05 14:11:10 -05:00
Kubernetes Publisher 32d0c3beba Merge pull request #84807 from clarklee92/ModifyTheStatusCode
Modify the status code number to HTTP status semantics

Kubernetes-commit: 43b102a83cc1d2b97a6a59f1c14967a840df2c35
2019-11-06 23:33:15 +00:00
clarklee92 87db492820 Modify the status code number to HTTP status semantics
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
2019-11-06 00:45:35 +08:00
Kubernetes Publisher 385e2fd91f Merge pull request #84677 from mikedanese/cfssl
remove cfssl dependencies

Kubernetes-commit: aaa57078969bbb72e9ebe45198edb0899bb1f7df
2019-11-05 03:47:58 +00:00
Mike Danese fc0d402286 support URI SANs in local signer
Kubernetes-commit: 6a004d0c18818f79d7c294091f071706aac2d912
2019-11-04 08:08:59 -08:00
Kubernetes Publisher e953b35e53 Merge pull request #84604 from codenrhoden/update-utils-dep
Update k8s.io/utils dependency to latest

Kubernetes-commit: 97e28edb6620568d985f3b03b495a0a373aa8750
2019-11-01 23:32:51 +00:00
Kubernetes Publisher dcc09b4f48 Merge pull request #84617 from seans3/testdata-move
Rename test/data directory to testdata

Kubernetes-commit: 868cbd119b216fbfafcc7cbfd7c4bd101d6bb6d8
2019-11-01 00:57:23 -07:00
Sean Sullivan 3ec9685c39 Rename test/data directory to testdata
Kubernetes-commit: 4ce97d6c48ae4735463f020430dd20539a03e8c5
2019-10-31 13:40:02 -07:00
Maciej Szulik 89d9f2ef29 Set TypeSetter in get print flags, like we do everywhere else
Kubernetes-commit: 626b9081fbee1eeae3f96a99f40da6c665d5753f
2019-10-31 18:25:46 +01:00
Travis Rhoden 4ccf9a3366 Update k8s.io/utils dependency to latest
Kubernetes-commit: 81f66ecbb5ff359ac765c7f332289dd8c1737c39
2019-10-31 08:35:01 -06:00
Kubernetes Publisher 2ba9448df4 Merge pull request #84540 from seans3/kubectl-get-staging
Moves kubectl get subcommand to staging

Kubernetes-commit: ecec5cb2a4328cef124670ef909971fcbf98ea8e
2019-10-31 07:26:35 +00:00
Ted Yu eb7c1bf189 Only put un-filtered pod in podDeleteList
Kubernetes-commit: 65c2f61806468d25795516d6077ce0c31c83adcd
2019-10-30 09:55:34 -07:00
Sean Sullivan b5647b2406 update-vendor.sh; updates modules files
Kubernetes-commit: bb30a469b67fa62aa72665d45643e9472971da75
2019-10-29 16:12:58 -07:00
Sean Sullivan 7965551001 Moves kubectl get subcommand to staging
Kubernetes-commit: 2a3f28863baa804a05d35c3958a107f9210b4c9e
2019-10-29 15:51:00 -07:00
Pablo Mercado 6b77b0790a Kubectl certificate signing: fix certificate deny message (#84400)
* add certificate deny flag message

* bring back NewCertificateOptions with operation parameter

Kubernetes-commit: e528c2f2925d61fa7a12313a895af5a312d36dd6
2019-10-27 03:24:33 +00:00
Kubernetes Publisher 050b0fdfeb Merge pull request #84316 from yutedz/graceful-del-note
Add note on the applicability of --grace-period flag

Kubernetes-commit: f440d61d7e19cc74805efdc732fbefbcf56f5d9d
2019-10-25 23:30:28 +00:00
Kubernetes Publisher 4634ffdafd Merge pull request #82794 from ingvagabund/fake-clientset-enforce-exact-much-for-get
Require exact match when calling Get method within fake clientset

Kubernetes-commit: cbf1e2d360698795e80bd4b80287149290f5919a
2019-10-25 23:30:26 +00:00
Kubernetes Publisher bba33b64db 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:30:23 +00:00
Kubernetes Publisher 864696d947 Merge pull request #84062 from seans3/tableprinter-move
Removes kubectl get dependency on Kubernetes core

Kubernetes-commit: df8587f99f9b356e4c26271b9aa8ba494ae6ed7e
2019-10-25 03:24:28 +00:00
Ted Yu 587c053a55 Add note on the applicability of --grace-period
Kubernetes-commit: abc9a9f8369c220ee3a1de2e1917edef3d7d680e
2019-10-24 16:07:02 -07:00
Kubernetes Publisher 7eb9b5b7db Merge pull request #84251 from deads2k/insecure-backend-proxy-kubectl
add option to skip verifying kubelet certificates for logs

Kubernetes-commit: 4c5889190b557d69c05bd3161e274d841ba823d2
2019-10-24 03:24:13 +00:00
Kubernetes Publisher 1bfbeaf206 Merge pull request #83795 from ivan4th/fix-drain-crash
Fix crash in kubectl drain

Kubernetes-commit: 4d5a687eddcdd03934594fb88a3063e26abc242c
2019-10-24 03:24:12 +00:00
Wenjia Zhang a9647ff698 Pin dependencies and update vendors
Kubernetes-commit: 660b17d0aeda96af94defd4c5110d9fef523d52b
2019-10-23 13:37:36 -07:00
David Eads 3fa753054c add option to skip verifying kubelet certificates for logs
Kubernetes-commit: f0931cbf48cb4f170177d42c1a3c75b9d8792c52
2019-10-23 14:33:37 -04:00
Michael Gugino a17d91f9f5 kubectl: remove unreachable code
This code cannot be reached and causes some external linters
to fail.

Kubernetes-commit: 46fd8fce45cfbbe5681a44872602da6daea80cf6
2019-10-23 11:20:40 -04:00