* scheduler(NodeResourcesFit): calculatePodResourceRequest in PreScore phase
* scheduler(NodeResourcesFit and NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase
* modify the comments and tests.
* revert the tests.
* don't need consider nodes.
* use list instead of map.
* add comment for podRequests.
* avoid using negative wording in variable names.
Mixed protocols were not supported in GCE loadbalancers for old
versions, so we should fail to avoid confusions on users.
Ref: k8s.io/cloud-provider-gcp#475
Change-Id: I5fbd5230afbc51d595cacc96b3fa86473a3eb131
DesiredStateOfWorld must remember both
- the effective SELinux label to apply as a mount option (non-empty for
RWOP volumes, empty otherwise)
- and the label that _would_ be used if the mount option would be used by
all access modes.
Mismatch warning metrics must be generated from the second label.
The checkpointing mechanism will repopulate DRA Manager in-memory cache on kubelet restart.
This will ensure that the information needed by the PodResources API is available across
a kubelet restart.
The ClaimInfoState struct represent the DRA Manager in-memory cache state in checkpoint.
It is embedd in the ClaimInfo which also include the annotation field. The separation between
the in-memory cache and the cache state in the checkpoint is so we won't be tied to the in-memory
cache struct which may change in the future. In the ClaimInfoState we save the minimal required fields
to restore the in-memory cache.
Signed-off-by: Moshe Levi <moshele@nvidia.com>
To enable rate limiting, needed for GA graduation,
we need to pass more parameters to the already crowded
`ListenAndServePodresources` function.
To tidy up a bit, pack the parameters in a helper struct,
with no intended changes in behavior.
Signed-off-by: Francesco Romani <fromani@redhat.com>
This is useful when a given set is shared through pointers, and
therefore can't be replaced with a new empty set. This replaces
set.Delete(set.UnsortedList()...), and allows the compiler to optimize
the function to a call to runtime.mapclear() when the set content type
is reflexive for ==. That optimization *is* currently accessible using
s := Set[...]{}
...
for i := range s {
delete(s, i)
}
but this circumvents the published API for sets; calling s.Delete(i)
instead can't be optimized in this fashion.
Alternatives considered but discarded include:
* turning sets into a pointer type (this isn't possible because
pointer types can't be receivers)
* using a pointer receiver for the Clear() function, i.e.
func (s *Set[T]) Clear() {
*s = New[T]()
}
but this doesn't update shared references.
Signed-off-by: Stephen Kitt <skitt@redhat.com>