Commit Graph

123691 Commits

Author SHA1 Message Date
Claudiu Belu
b5e3b81de6 unittests: Fixes unit tests for Windows (part 12)
Currently, there are some unit tests that are failing on Windows due
to various reasons:

- IPVS proxy mode is not supported on Windows.
- pkg/kubelet/cri/remote was moved to cri-client.
2024-06-28 08:05:38 +00:00
Kubernetes Prow Robot
d40676c227
Merge pull request #122047 from aojea/treeless
KEP-1880 Multiple Service CIDRs: Graduate to Beta (1/2)
2024-06-28 01:00:20 -07:00
Vinayak Goyal
c3ae97056d Remove kubelet soft admission. 2024-06-28 06:57:04 +00:00
Antonio Ojea
ac82ba67f7 update openapi 2024-06-28 06:54:14 +00:00
kerthcet
a7ef06da87 Set permit timeout to 10s in test
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-06-28 14:02:36 +08:00
Kubernetes Prow Robot
f24211524b
Merge pull request #125714 from googs1025/add_defaultSelector_ut
chore: add DefaultSelector method ut
2024-06-27 22:10:59 -07:00
Kubernetes Prow Robot
4c44efe81c
Merge pull request #125759 from dims/bump-prometheus/common-v0.55.0
Bump `prometheus/common` to v0.55.0
2024-06-27 20:40:05 -07:00
Kubernetes Prow Robot
522e2e5066
Merge pull request #124917 from vinayakankugoyal/kep4633
KEP-4633: Only allow anonymous auth for configured endpoints.
2024-06-27 20:39:51 -07:00
Kubernetes Prow Robot
bec82cc63c
Merge pull request #125479 from kundan2707/kube_proxy_update
kube-proxy config update
2024-06-27 18:13:32 -07:00
Vinayak Goyal
5e6a4937f5 KEP-4633: Allow health-only anonymous auth mode.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2024-06-28 00:30:05 +00:00
Kubernetes Prow Robot
2c6daa41de
Merge pull request #125162 from sttts/sttts-code-generator-core-group
code-generator/client-gen: decouple core group from package name 'api'
2024-06-27 16:12:15 -07:00
Antonio Ojea
2aeace5977 generated 2024-06-27 21:00:57 +00:00
Kubernetes Prow Robot
742b2f70b9
Merge pull request #125766 from dims/update-moby/spdystream-to-v0.4.0
Update moby/spdystream to v0.4.0
2024-06-27 13:02:35 -07:00
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