Drivers need to know that because admin access may also grant additional
permissions. The allocator needs to ignore such results when determining which
devices are considered as allocated.
In both cases it is conceptually cleaner to not rely on the content of the
ClaimSpec.
Kubernetes-commit: f3fef01e79a75ebc4c327afb7d05d6fd350e08fa
As with the apiserver feature gate for CBOR as a serving and storage encoding, the client feature
gates for CBOR are being initially added through a test-only feature gate instance that is not wired
to environment variables or to command-line flags and is intended only to be enabled
programmatically from integration tests. The test-only instance will be removed as part of alpha
graduation and replaced by conventional client feature gating.
Kubernetes-commit: ea13190d8bd3a4bb3e82055b529aa7599ae5c6e1
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.
The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.
Kubernetes-commit: f84eb5ecf894fa0fc4e0d05da52ef51d4cd723d9
The context is used for cancellation and to support contextual logging.
In most cases, alternative *WithContext APIs get added, except for
NewIntegerResourceVersionMutationCache where code searches indicate that the
API is not used downstream.
An API break around SharedInformer couldn't be avoided because the
alternative (keeping the interface unchanged and adding a second one with
the new method) would have been worse. controller-runtime needs to be updated
because it implements that interface in a test package. Downstream consumers of
controller-runtime will work unless they use those test package.
Converting Kubernetes to use the other new alternatives will follow. In the
meantime, usage of the new alternatives cannot be enforced via logcheck
yet (see https://github.com/kubernetes/kubernetes/issues/126379 for the
process).
Passing context through and checking it for cancellation is tricky for event
handlers. A better approach is to map the context cancellation to the normal
removal of an event handler via a helper goroutine. Thanks to the new
HandleErrorWithLogr and HandleCrashWithLogr, remembering the logger is
sufficient for handling problems at runtime.
Kubernetes-commit: 4638ba971661497b147906b8977ae206c9dd6e44
Several tests leaked goroutines. All of those get fixed where possible
without API changes. Goleak is used to prevent regressions.
One new test specifically covers shutdown of an informer and its event
handlers.
Kubernetes-commit: 0ba43734b4c8998b4aaeb1fa2bec8dee609fa50a
With this change, we can typically avoid an extra heap allocation when
calling AddAfter with a positive duration (which causes the creation of
a waitFor object). This is because workqueues are typically used with
string keys, and casting a string (or more generally, non-pointer types)
to an `interface{}` will cause an heap escape / allocation.
Ater this change, there is no longer any usage of `type t interface{}`,
which was creating some confusion after the switch to generics in the
workqueue package.
Co-authored-by: Quan Tian <quan.tian@broadcom.com>
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Kubernetes-commit: 53ddffb55709857fec6bddbd5ca4ca1b03f7da97
I frequently find myself in the situation of not remembering which of
QPS/Burst I have to set. This change adds a small go doc to clarify
that.
Kubernetes-commit: cd1645ff2c195fbb353cfabcbc36e3c3b883c3c5
The workqueue implementation was recently updated to be strongly typed,
using Go generics. However the metrics implementation was not updated,
and continued using interface{}. This translated to unnecessary memory
allocations when invoking the queueMetrics interface methods to track
queue operation. We can avoid these extra heap allocations by using
generics for the metrics implementation as well.
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Kubernetes-commit: 1aec7568e111f5855121e3afacacf431e5f95948