Commit Graph

1212 Commits

Author SHA1 Message Date
Kubernetes Publisher 21ad77b94e Merge pull request #85595 from zhouya0/add_test_coverage_with_kubectl_get_components
add test coverage with kubectl get components

Kubernetes-commit: ab0bfb304caa3f67d5c207c2356557cda90936b9
2019-12-04 09:45:19 +00:00
Nan Yu 656f993514 Rename PodDisruptionsAllowed to DisruptionsAllowed in type PodDisruptionBudgetStatus
Kubernetes-commit: 1fb0dd4ec5134014e466509163152112626d52c3
2019-12-03 11:22:23 -08:00
Jordan Liggitt 1d31df4756 fixup kubectl test
Kubernetes-commit: deb75da17bb1fa95e5b56fb1207ba247cd9953dd
2019-11-26 13:13:38 -05:00
Jordan Liggitt 74e4737411 Switch TableGenerator/TableConvertor interfaces to metav1
Kubernetes-commit: 36eb250cbb441984260ded6f7abeb796974031c3
2019-11-26 13:13:25 -05:00
Kubernetes Publisher c273777957 Merge pull request #85496 from tanjunchen/fix-invalid-urls
fix 1-12 number urls

Kubernetes-commit: a3a2c4230d8cea0d192fb15835c47da3604bd95e
2019-11-26 02:26:06 +00:00
Kubernetes Publisher d134c5a987 Merge pull request #85556 from wojtek-t/fix_kubectl_conversions
Cleanup conversions in kubectl

Kubernetes-commit: c3184828cbc87b8fbac4c8ee2d6a5cafbe315137
2019-11-25 18:41:53 +00:00
zhouya0 6d82c82d12 add test coverage with kubectl get components
Kubernetes-commit: 07806d4300c5f410194c0dcd2da86c40bef42e1b
2019-11-25 17:57:56 +08:00
Michael Gugino ebda9f6262 kubectl/drain: add option skip-wait-for-delete-timeout
Currently, some circumstances may cause waitForDelete to
never succeed after the pod has been marked for deletion.
In particular, Nodes that are unresponsive and have
pods with local-storage will not be able to
successfully drain.

We should allow drain to ignore pods that have a
DeletionTimestamp older than a user-provided age.
This will allow controllers utilizing kubectl/drain
to optionally account for a pod that cannot be
removed due to a misbehaving node.

Kubernetes-commit: da53044abdf8c8a9771a5c3dfd861f0c4ec78c40
2019-11-23 20:00:06 -05:00
Michael Gugino fe592e7f80 kubectl/drain: Add context support
This commits allows specifying a context.Context
in the Helper type. This context is utilized to
cancel waitForDelete.

Kubernetes-commit: 8682e902f5487e04b893da7230125db0d7ae66b4
2019-11-23 13:58:59 -05:00
Michael Gugino feccbe3c28 kubectl/drain: add disable-eviction option
Currently, if eviction is supported during a drain operation,
eviction is always used.

This commit allows the user to specify disabling eviction.
This is particularly useful when you wish to ignore
PodDisruptionBudgets after a normal drain has failed for
some time.

Kubernetes-commit: 6c1d587d5142b95e6c169a198a086332a7e4d8ad
2019-11-23 11:18:52 -05:00
Naoki Oketani fe07b19cb4 Fix a bug in port-forward: named port not working with service
Kubernetes-commit: 73c1ab71e27eee0066ba637575e60093952f3ff1
2019-11-22 02:59:26 +09:00
tanjunchen 59fe764179 fix 1-12 number urls
Kubernetes-commit: 8f4a262d618ff5457268d7494e3720ee37b524b0
2019-11-21 11:17:46 +08:00
Kubernetes Publisher c390dc2e34 Merge pull request #85223 from sttts/sttts-crd-items-types
apiextensions: fix items+type logic in API due to broken go-openapi validation

Kubernetes-commit: 976712556e4bd22d5312a0af36b18127c709d54a
2019-11-21 02:31:11 +00:00
Sally O'Malley de3d4fcc02 don't error if set-resources patch is empty
Kubernetes-commit: ecd1c0747272ab908daa64b0f4b2b18a8cb18362
2019-11-20 19:22:18 -05:00
zhouya0 0833d7cba2 kubectl change podSecurityPolicy group
Kubernetes-commit: 7947b6ce6d8a498000d81b68fa674f88b1d7680a
2019-11-18 15:00:33 +08:00
Wojciech Tyczynski 24d21a0ee4 Fix kubectl conversions
Kubernetes-commit: bfa4188123ed334d4f5dda3a79994cadf663d8f2
2019-11-17 18:35:55 +01:00
Dr. Stefan Schimanski f605806477 hack/pin-dependency.sh github.com/go-openapi/validate v0.19.5
Kubernetes-commit: ef88c43c0296e6004d0e3407a1336074897b309d
2019-11-15 13:48:59 +01:00
Kubernetes Publisher fbc5d36fee Merge pull request #85305 from codenrhoden/remove-mount-pkg
Remove pkg/util/mount (moved out of tree)

Kubernetes-commit: 45e0080fd5883e3355233c9c22fa5bf242d525dd
2019-11-15 22:28:26 +00:00
Travis Rhoden 5790b8d2d7 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 14ad457328 Merge pull request #84424 from mikedanese/expcache
Add an expiring cache for the caching token authenticator

Kubernetes-commit: 19b4017b5d5c5695403a9804f5ea3de11a436c04
2019-11-15 02:26:11 +00:00
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