Commit Graph

123732 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
010409ad0d
Merge pull request #125730 from p0lyn0mial/upstream-bring-back-consistent-read-from-cache-supports-pagination
apiserver/storage/cacher: consistent read from cache supports limit
2024-06-27 11:57:20 -07:00
Kubernetes Prow Robot
ef1d28aa52
Merge pull request #125177 from liggitt/dynamic-public-key
Move public key serviceaccount getter to interface, filter by key id
2024-06-27 11:57:06 -07:00
Kubernetes Prow Robot
991e7a8c15
Merge pull request #125646 from HirazawaUi/apply-null
Prune explicit nulls from client-side apply create
2024-06-27 10:40:14 -07:00
Kubernetes Prow Robot
df20694c62
Merge pull request #125600 from thockin/plus_default_deprecated_volumes
Use +default for deprecated volume types
2024-06-27 10:40:00 -07:00
Antonio Ojea
91c4aac738 document the API with the details about the allocation CIDR ranges 2024-06-27 17:18:00 +00:00
Davanum Srinivas
377a3f7ec4
Update moby/spdystream to v0.4.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-27 13:07:47 -04:00
Patrick Ohly
bde9b64cdf DRA: remove "source" indirection from v1 Pod API
This makes the API nicer:

    resourceClaims:
    - name: with-template
      resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      resourceClaimName: test-shared-claim

Previously, this was:

    resourceClaims:
    - name: with-template
      source:
        resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      source:
        resourceClaimName: test-shared-claim

A more long-term benefit is that other, future alternatives
might not make sense under the "source" umbrella.

This is a breaking change. It's justified because DRA is still
alpha and will have several other API breaks in 1.31.
2024-06-27 17:53:24 +02:00
Kubernetes Prow Robot
41f21823f5
Merge pull request #125758 from SataQiu/improve-validateSupportedVersion-20240627
kubeadm: improve the error/warning messages of `validateSupportedVersion` to include the checked resource kind
2024-06-27 07:45:17 -07:00
Davanum Srinivas
35ccdc8b35
Bump prometheus/common to v0.55.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-27 09:34:23 -04:00
Dr. Stefan Schimanski
ac3b7643ad
make codegen
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-06-27 15:33:08 +02:00
Dr. Stefan Schimanski
676d989713
code-generator/examples: fix json tags
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-06-27 15:16:41 +02:00
Dr. Stefan Schimanski
be2cf7e4d9
code-generator/client-gen: add example with single package api/v1
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-06-27 15:16:41 +02:00
Dr. Stefan Schimanski
6b2f779bd4
code-generator/client-gen: decouple core group from package name 'api'
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-06-27 15:16:40 +02:00
Dr. Stefan Schimanski
7e52d34852
code-generator/client-gen: add example with core group
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-06-27 15:16:39 +02:00
Patrick Ohly
4bddebc48e DRA: fix scheduler/resource claim controller race with retry
The JSON patch approach works, but it is complex. A retry loop is easier to
understand (detect conflict, get new claim, try again). There is one additional
API call (the get), but in practice this scenario is unlikely.
2024-06-27 15:03:56 +02:00
Patrick Ohly
ecbafb8de5 DRA: fix scheduler/resource claim controller race
There was a race caused by having to update claim finalizer and status in two
different operations:
- Resource claim controller removes allocation, does not yet
  get to remove the finalizer.
- Scheduler prepares an allocation, without adding the finalizer
  because it's there.
- Controller removes finalizer.
- Scheduler adds allocation.

This is an invalid state. Automatic checking found this during the execution of
the "with translated parameters on single node.*supports sharing a claim
sequentially" E2E test, but only when run stand-alone. When running in
parallel (as in the CI), the bad outcome of the race did not occur.

The fix is to check that the finalizer is still set when adding the
allocation. The apiserver doesn't check that because it doesn't know which
finalizer goes with the allocation result. It could check for "some finalizer",
but that is not guaranteed to be correct (could be some unrelated one).

Checking the finalizer can only be done with a JSON patch. Despite the
complications, having the ability to add multiple pods concurrently to
ReservedFor seems worth it (avoids expensive rescheduling or a local retry
loop).

The resource claim controller doesn't need this, it can do a normal update
which implicitly checks ResourceVersion.
2024-06-27 15:03:06 +02:00
Lukasz Szaszkiewicz
2f9660db6b apiserver/storage/watchcache: WaitUntilFreshAndList supports path prefix 2024-06-27 14:30:42 +02:00
Lukasz Szaszkiewicz
c259fe2342 flowcontrol/request/list_work_estimator: sync shouldDelegateList 2024-06-27 14:30:42 +02:00
Lukasz Szaszkiewicz
09e85983d8 apiserver/storage/cacher: cache supports pagination 2024-06-27 14:30:42 +02:00
Kubernetes Prow Robot
29defc15aa
Merge pull request #125756 from p0lyn0mial/upstream-improve-run-test-list
apiserver/storage: storagetesting.RunTestList validates RemainingItemCount
2024-06-27 05:25:16 -07:00
Antonio Ojea
194609bd6a fix comment on integration test 2024-06-27 11:45:37 +00:00
Antonio Ojea
476b415873 simplify test code using the if with a short statement 2024-06-27 11:44:27 +00:00
Antonio Ojea
69360e9b5e fix wrong comment on method to detect IPs out of ranges 2024-06-27 11:41:47 +00:00
Antonio Ojea
967ad95b53 use an AND to define the allocator readiness 2024-06-27 11:39:36 +00:00
Antonio Ojea
fed0517fba fix typo enque should be enqueue 2024-06-27 11:37:32 +00:00
Antonio Ojea
9b1bad431b implement dual write on Service ClusterIP allocator
MultiCIDRServiceAllocator implements a new ClusterIP allocator based on
IPAddress object to solve the problems and limitations caused by
existing bitmap allocators.

However, during the rollout of new versions, deployments need to support
a skew of one version between kube-apiservers. To avoid the possible
problem where there are multiple Services requests on the skewed
apiservers and that both allocate the same IP to different Services,
the new allocator will implement a dual-write strategy under the
feature gate DisableAllocatorDualWrite.

After the MultiCIDRServiceAllocator is GA, the DisableAllocatorDualWrite
can be enabled safely as all apiservers will run with the new
allocators. The graduation of DisableAllocatorDualWrite can also
be used to clean up the opaque API object that contains the old bitmaps.

If MultiCIDRServiceAllocator is enabled and DisableAllocatorDualWrite is disable
and is a new environment, there is no bitmap object created, hence, the
apiserver will initialize it to be able to write on it.
2024-06-27 11:33:36 +00:00
Antonio Ojea
7c4726d016 allow to shutdown quickly the apiserver 2024-06-27 11:33:36 +00:00
Antonio Ojea
418f98aae4 repairip wait for the default servicecidr 2024-06-27 11:33:36 +00:00
Antonio Ojea
8490273979 performance test to compare allocators
The current results with 100 works and 15k services on a (n2-standard-48) vCPU: 48 RAM: 192 GB are:
Old allocator:

perf_test.go:139: [RESULT] Duration 1m9.646167533s: [quantile:0.5  value:0.462886801 quantile:0.9  value:0.496662838 quantile:0.99  value:0.725845905]

New allocator:
perf_test.go:139: [RESULT] Duration 2m12.900694343s: [quantile:0.5  value:0.481814448 quantile:0.9  value:1.3867615469999999 quantile:0.99  value:1.888190671]

The new allocator has higher latency but in contrast allow to use a
larger number of services, when tested with 65k Services the old
allocator etcd crashes with storage exceeded.

The scenario is also not realistic, as a continuous and high load on
Service creation is not expected.
2024-06-27 11:33:36 +00:00
Antonio Ojea
6639411231 add log to migration test 2024-06-27 11:33:36 +00:00
Antonio Ojea
101722249d test enable and disable ServiceCIDR feature 2024-06-27 11:33:36 +00:00
Antonio Ojea
f36975b193 remove iptree from tree 2024-06-27 11:33:36 +00:00
Antonio Ojea
b04ca186d8 replace the iptree on the ipallocator
ServiceCIDRs are protected by finalizers and the CIDRs fields are
inmutable once set, only the readiness state impact the allocator
as it can only allocate IPs if any of the ServiceCIDR is ready.

The Add/Update events triggers a reconcilation of the current state
of the ServiceCIDR present in the informers with the existing IP
allocators.

The Delete events are handled directly to update or delete the
corresponing IP allocator.
2024-06-27 11:33:36 +00:00
Antonio Ojea
b5cfccbca7 replace iptree on the servicecidr controller 2024-06-27 11:33:36 +00:00
Antonio Ojea
f06b355daf replace iptree on the repairip controller 2024-06-27 11:33:35 +00:00
Antonio Ojea
55c9b58e48 add new metric to record the latency to allocate an IP address 2024-06-27 11:33:35 +00:00
Kubernetes Prow Robot
95c7621ed0
Merge pull request #125755 from saschagrunert/named-param-service
Make CRI service interface function arguments consistent
2024-06-27 04:22:05 -07:00
Kubernetes Prow Robot
24478e0c4a
Merge pull request #125729 from p0lyn0mial/upstream-deflake-test-wait-until-fresh
storage/cacher/cacher_whitebox_test.go: deflake TestWaitUntilFreshAndListFromCache
2024-06-27 04:21:58 -07:00
SataQiu
7120b3902c kubeadm: improve the error/warning messages of 'validateSupportedVersion' to include the checked resource kind 2024-06-27 18:47:09 +08:00
Kubernetes Prow Robot
7210f2aa68
Merge pull request #125752 from SataQiu/fix-cmd-desc-20240627
kubeadm: update the long description about 'kubeadm config' command
2024-06-27 03:20:17 -07:00
Kubernetes Prow Robot
92e0db2bbf
Merge pull request #125640 from googs1025/resourceclaim_controller_log_fix1
added resourceclaim_controller log info
2024-06-27 03:20:10 -07:00
Kubernetes Prow Robot
e31d2cef71
Merge pull request #125736 from aojea/netpol_v0.4.0
update kube-network-policies to v0.4.0
2024-06-27 02:14:51 -07:00
Lukasz Szaszkiewicz
f9b15700fb apiserver/storage: storagetesting.RunTestList validates RemainingItemCount 2024-06-27 11:06:15 +02:00
Sascha Grunert
4411a070fc
Make CRI service interface function arguments consistent
The arguments should contain named parameters, which is now the case.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-06-27 10:30:24 +02:00
SataQiu
6190152abd kubeadm: update the long description about 'kubeadm config' command 2024-06-27 15:54:42 +08:00
Kubernetes Prow Robot
d4c18e5454
Merge pull request #125709 from benluddy/test-fuzz-owners
Add OWNERS to test/fuzz.
2024-06-27 00:50:33 -07:00
Kubernetes Prow Robot
210ab3cbab
Merge pull request #124241 from chengjoey/fix/gce-base64
fix base64 invalid argument when running gce util.sh
2024-06-27 00:50:15 -07:00
Lukasz Szaszkiewicz
825091693d kube-controller-manager: enable WatchListClient 2024-06-27 09:01:06 +02:00
Lukasz Szaszkiewicz
be00cded2d e2e/apimachinery/watchlist: always run WatchList e2e tests 2024-06-27 08:49:59 +02:00
Lukasz Szaszkiewicz
0b15903b35 kube-apiserver: promote WatchList feature to beta 2024-06-27 08:49:59 +02:00