Commit Graph

123678 Commits

Author SHA1 Message Date
Patrick Ohly
719a49cc13 scheduler: fix klog.KObjSlice when applied to []*NodeInfo
The DRA plugin does that. It didn't actually work and only printed an error
message about NodeInfo not implementing klog.KMetata. That's not a compile-time
check due to limitations with Go generics and had been missed earlier.
2024-06-26 08:11:31 +02:00
Patrick Ohly
fc55fecd45 ktesting: support capturing log output
This is a feature of the underlying k8s.io/klog/v2/ktesting which is
useful also when using the Kubernetes ktesting.
2024-06-26 08:11:31 +02:00
Kubernetes Prow Robot
10e3ec8975
Merge pull request #125706 from jpbetz/fix-fixture-test
Remove test dependency on swagger.json to fix client-go tests
2024-06-25 21:56:27 -07:00
Kubernetes Prow Robot
fb0195df11
Merge pull request #123428 from atiratree/UnhealthyPodEvictionPolicy-GA
promote PDBUnhealthyPodEvictionPolicy to GA
2024-06-25 21:56:20 -07:00
Paco Xu
df17ea2e37
Revert "apiserver/storage/cacher: consistent read from cache supports limit" 2024-06-26 11:51:12 +08:00
Kubernetes Prow Robot
c6fd466fb4
Merge pull request #125703 from sbueringer/pr-fix-message-expression-evaluation
Validate CRD stored messageExpressions with the correct CEL environment
2024-06-25 20:04:54 -07:00
Kubernetes Prow Robot
7a6062f4c1
Merge pull request #122891 from siyuanfoundation/api-comp-ver1
apimachinery: API Emulation Versioning
2024-06-25 20:04:48 -07:00
Ben Luddy
2029bba634
Remove temporary mechanism for skipping CBOR tests.
The CBOR decode and "appendix a" unit tests cover specific serialization behaviors that were known
to be incomplete at the time. Now that all of those cases have been addressed, the mechanism for
skipping those tests can be removed.
2024-06-25 21:12:54 -04:00
Ben Luddy
38f87df0e3
Enable JSON-compatible base64 encoding of []byte for CBOR.
The encoding/json package marshals []byte to a JSON string containing the base64 encoding of the
input slice's bytes, and unmarshals JSON strings to []byte by assuming the JSON string contains a
valid base64 text.

As a binary format, CBOR is capable of representing arbitrary byte sequences without converting them
to a text encoding, but it also needs to interoperate with the existing JSON serializer. It does
this using the "expected later encoding" tags defined in RFC 8949, which indicate a specific text
encoding to be used when interoperating with text-based protocols. The actual conversion to or from
a text encoding is deferred until necessary, so no conversion is performed during roundtrips of
[]byte to CBOR.
2024-06-25 21:05:26 -04:00
Kubernetes Prow Robot
85ede67ac9
Merge pull request #125681 from aojea/netpol_3
bump kube-network-policies to v0.3.0
2024-06-25 16:47:33 -07:00
Kubernetes Prow Robot
f848e4df7b
Merge pull request #125679 from dims/add-sig/etcd-labels-for-related-directories
Add sig/etcd labels for related directories
2024-06-25 16:47:26 -07:00
Kubernetes Prow Robot
d48a3036be
Merge pull request #125537 from seans3/rc-fallback-log
Adds logging during remote command executor fallback
2024-06-25 16:47:20 -07:00
Kubernetes Prow Robot
727fe1671b
Merge pull request #125421 from benluddy/cbor-simple-values
KEP-4222: Reject CBOR simple values other than true, false, and null.
2024-06-25 16:47:10 -07:00
Siyuan Zhang
379676c4be add DefaultComponentGlobalsRegistry flags in ServerRunOptions
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Siyuan Zhang
4352c4ad27 Add version mapping in ComponentGlobalsRegistry.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Siyuan Zhang
701e5fc374 Add composition flags for emulation version and feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Siyuan Zhang
403301bfdf apiserver: Add API emulation versioning.
Co-authored-by: Siyuan Zhang <sizhang@google.com>
Co-authored-by: Joe Betz <jpbetz@google.com>
Co-authored-by: Alex Zielenski <zielenski@google.com>

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Jordan Liggitt
3e037070bb
Move public key getter to interface 2024-06-25 18:10:08 -04:00
Kubernetes Prow Robot
d0579b6f9c
Merge pull request #125683 from likakuli/fix-benchmarkupdatesnapshot
clean: add nodeinfo to cache
2024-06-25 14:18:39 -07:00
Kubernetes Prow Robot
beb48b7f5d
Merge pull request #125669 from benluddy/cbor-bump-v2.7.0
KEP-4222: Bump github.com/fxamacker/cbor/v2 to v2.7.0.
2024-06-25 14:18:33 -07:00
Kubernetes Prow Robot
c2fc33869f
Merge pull request #125667 from p0lyn0mial/upstream-watchlist-off-when-progress-notification-disabled
cacher: returns an error when watch list was requested and storage.RequestWatchProgress is disabled
2024-06-25 14:18:26 -07:00
Kubernetes Prow Robot
59673f0f37
Merge pull request #125578 from nayihz/fix_sche_queue_update
skip update pod that exist in scheduling cycle
2024-06-25 14:18:19 -07:00
Kubernetes Prow Robot
2200f5ef1b
Merge pull request #125446 from AkihiroSuda/rro-e2e-remove-withserial
e2e_node/mount_rro_linux_test.go: remove unneeded WithSerial
2024-06-25 14:18:12 -07:00
Kubernetes Prow Robot
d198961730
Merge pull request #125418 from benluddy/cbor-byte-array-to-array
KEP-4222: Encode byte array to CBOR as array of integer, not byte string.
2024-06-25 14:18:05 -07:00
Kubernetes Prow Robot
0913b90809
Merge pull request #125402 from iholder101/swap/skip-e2e-test-if-no-swap
[KEP-2400]: Swap e2e tests: skip swap stress tests if swap is not provisioned
2024-06-25 14:17:58 -07:00
Kubernetes Prow Robot
34dd2007cb
Merge pull request #125263 from jpbetz/fix-nop-apply
Fix check to ignore non-semantic changes to objects to handle unstructured
2024-06-25 14:17:51 -07:00
Kubernetes Prow Robot
8c478a06d8
Merge pull request #124595 from pohly/dra-scheduler-assume-cache-eventhandlers
DRA: scheduler event handlers via assume cache
2024-06-25 11:56:28 -07:00
Joe Betz
1095af88e7 Remove test dependency on swwagger.json to fix client-go repo 2024-06-25 13:31:03 -04:00
HirazawaUi
c29a19610a add tests 2024-06-26 01:07:24 +08:00
Stefan Bueringer
d081fd56a2
Validate stored messageExpressions with the correct CEL environment
Signed-off-by: Stefan Büringer buringerst@vmware.com
2024-06-25 18:37:34 +02:00
Kubernetes Prow Robot
8b72795621
Merge pull request #125536 from this-is-yaash/documentation-enhance
enhanced the docker build documentation for readability and clarity
2024-06-25 08:26:08 -07:00
Kubernetes Prow Robot
9d9b6fb876
Merge pull request #125261 from bart0sh/PR145-DevicePluginCDIDevices-update-GA-milestone
features: update milestone for DevicePluginCDIDevices
2024-06-25 08:25:59 -07:00
Patrick Ohly
2da9e660e3 resourceclaim controller: add missing log output
The logging was fairly complete about *not* doing something, but the actual
ResourceClaim creation was not logged.
2024-06-25 16:12:31 +02:00
Ben Luddy
dbe4c093d9
Bump github.com/fxamacker/cbor/v2 to v2.7.0. 2024-06-25 10:07:40 -04:00
Patrick Ohly
7f87629a3f DRA e2e: fix error reporting in test driver
Dropping the error that is returned by allocateOne hides the reason *why*
allocation failed. Including the UID is "too much information" for an error
message (usually the user doesn't care about the exact identity, just the name)
and the claim name can and will be added by the caller.

Before:

    controller.go:373: E0625 16:04:12.140953] test-driver.cdi.k8s.io/resource controller: processing failed err="claim test-dramq9jv-resource-h72pg: failed allocating claim 8551afba-3c9a-4a8a-8633-6fad6c4b9e42" key="schedulingCtx:test/test-dramq9jv"
    event.go:377: I0625 16:04:12.141031] test-driver.cdi.k8s.io/resource controller: Event(v1.ObjectReference{Kind:"PodSchedulingContext", Namespace:"test", Name:"test-dra65gfw", UID:"6be9ba57-31da-4fef-b61d-b0468d71afcf", APIVersion:"resource.k8s.io/v1alpha3", ResourceVersion:"197", FieldPath:""}): type: 'Warning' reason: 'Failed' claim test-dra65gfw-resource-zpzrj: failed allocating claim f98a32e1-ab7d-4b34-a258-6d8224aa9006

After:

    controller.go:373: E0625 16:02:54.248059] test-driver.cdi.k8s.io/resource controller: processing failed err="claim test-dram98ll-resource-nvsbj: device selectors are not supported" key="schedulingCtx:test/test-dram98ll"
    event.go:377: I0625 16:02:54.248163] test-driver.cdi.k8s.io/resource controller: Event(v1.ObjectReference{Kind:"PodSchedulingContext", Namespace:"test", Name:"test-dratpt77", UID:"24010402-b026-4fe4-a535-e1dab69db8c0", APIVersion:"resource.k8s.io/v1alpha3", ResourceVersion:"298", FieldPath:""}): type: 'Warning' reason: 'Failed' claim test-dratpt77-resource-vlgrv: device selectors are not supported
2024-06-25 16:04:56 +02:00
Patrick Ohly
900457c09b ktesting: improve per-test log output
format.Object adds some white space in front of the value and a type identifier
in angle brackets. Both is distracting when printing simple values and can be
avoided by picking fmt.Sprintf for those types, plus trimming the result of
format.Object.

Before:

    allocator.go:483: I0625 15:35:31.946980] Allocating one device currentClaim=    <int>: 0 totalClaims=    <int>: 1 currentRequest=    <int>: 0 totalRequestsPerClaim=    <int>: 1 currentDevice=    <int>: 0 devicesPerRequest=    <int>: 1 allDevices=    <bool>: false adminAccess=    <bool>: false

After:

    allocator.go:483: I0625 15:35:04.371441] Allocating one device currentClaim=0 totalClaims=1 currentRequest=0 totalRequestsPerClaim=1 currentDevice=0 devicesPerRequest=1 allDevices=false adminAccess=false
2024-06-25 16:00:38 +02:00
likakuli
ea6ca270b5 clean: add nodeinfo to cache
Signed-off-by: likakuli <1154584512@qq.com>
2024-06-25 21:29:05 +08:00
Ed Bartosh
f53991d111 kube_features: DevicePluginCDIDevices: LockToDefault 2024-06-25 16:14:48 +03:00
Kubernetes Prow Robot
a95f636e92
Merge pull request #125693 from neolit123/1.31-remove-chendave
e2e_kubeadm: move chendave to emeritus
2024-06-25 06:09:41 -07:00
Patrick Ohly
1b63639d31 DRA scheduler: use assume cache to list claims
This finishes the transition to the assume cache as source of truth for the
current set of claims.

The tests have to be adapted. It's not enough anymore to directly put objects
into the informer store because that doesn't change the assume cache
content. Instead, normal Create/Update calls and waiting for the cache update
are needed.
2024-06-25 14:00:25 +02:00
Patrick Ohly
9a6f3b9388 scheduler: central ResourceClaim assume cache
This enables connecting the event handler for ResourceClaim to the assume
cache, which addresses a theoretic race condition.

It may also be useful for implementing the autoscaler support, because now
the autoscaler can modify the content of the cache.
2024-06-25 14:00:25 +02:00
Patrick Ohly
dea16757ef scheduler: AddEventHandler for assume cache
This enables using the assume cache for cluster events.
2024-06-25 14:00:25 +02:00
Patrick Ohly
171620765e ktesting: add Step
Step simplifies using WithStep because it creates a local scope where the same
tCtx variable is the one with the step name.
2024-06-25 14:00:22 +02:00
Patrick Ohly
639f86915b scheduler: add FIFO queue
This is a basic implementation of a first-in-first-out queue with unbounded
size. It's useful for cases where a channel with fixed size might deadlock.

The caller is responsible for locking.
2024-06-25 13:56:15 +02:00
Lubomir I. Ivanov
636f38a9fe e2e_kubeadm: move chendave to emeritus
Technically an approver for cmd/kubeadm, so for this OWNERS
file there should be emeritus approver status.
2024-06-25 14:47:30 +03:00
Davanum Srinivas
16e24513b7
drop OWNERS in kubeadm
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-25 06:42:33 -04:00
Mengjiao Liu
9ae15e6022 Fixed metrics missing issue for metrics reference page 2024-06-25 17:44:47 +08:00
Kubernetes Prow Robot
8cf93c8d83
Merge pull request #125405 from p0lyn0mial/upstream-consistent-read-from-cache-supports-pagination
apiserver/storage/cacher: consistent read from cache supports limit
2024-06-25 02:15:53 -07:00
Kubernetes Prow Robot
80212923db
Merge pull request #124025 from saschagrunert/log-container-status
Continue streaming kubelet logs when runtime is unavailable
2024-06-25 02:15:40 -07:00
Lukasz Szaszkiewicz
cb8cbc60a1 cacher: returns an error when watch list was requested and storage.RequestWatchProgress is disabled 2024-06-25 10:04:37 +02:00