kubernetes/pkg/scheduler/framework
Patrick Ohly 444d23bd2f dra: generated name for ResourceClaim from template
Generating the name avoids all potential name collisions. It's not clear how
much of a problem that was because users can avoid them and the deterministic
names for generic ephemeral volumes have not led to reports from users. But
using generated names is not too hard either.

What makes it relatively easy is that the new pod.status.resourceClaimStatus
map stores the generated name for kubelet and node authorizer, i.e. the
information in the pod is sufficient to determine the name of the
ResourceClaim.

The resource claim controller becomes a bit more complex and now needs
permission to modify the pod status. The new failure scenario of "ResourceClaim
created, updating pod status fails" is handled with the help of a new special
"resource.kubernetes.io/pod-claim-name" annotation that together with the owner
reference identifies exactly for what a ResourceClaim was generated, so
updating the pod status can be retried for existing ResourceClaims.

The transition from deterministic names is handled with a special case for that
recovery code path: a ResourceClaim with no annotation and a name that follows
the Kubernetes <= 1.27 naming pattern is assumed to be generated for that pod
claim and gets added to the pod status.

There's no immediate need for it, but just in case that it may become relevant,
the name of the generated ResourceClaim may also be left unset to record that
no claim was needed. Components processing such a pod can skip whatever they
normally would do for the claim. To ensure that they do and also cover other
cases properly ("no known field is set", "must check ownership"),
resourceclaim.Name gets extended.
2023-07-11 14:23:48 +02:00
..
autoscaler_contract kube-scheduler: NewFramework function to pass the context parameter 2023-05-23 10:17:34 +08:00
fake Fix nil pointer error in nodevolumelimits csi logging 2023-01-25 09:37:46 -08:00
parallelize Avoid metric lookup in Parallelizer.Util on every work piece 2023-03-09 17:12:30 +00:00
plugins dra: generated name for ResourceClaim from template 2023-07-11 14:23:48 +02:00
preemption kube-scheduler: NewFramework function to pass the context parameter 2023-05-23 10:17:34 +08:00
runtime Support fine-gained rescheduling in ReservePlugin 2023-07-07 13:30:29 +08:00
cycle_state.go feature(scheduler): won't run Score if PreScore returned a Skip status (#115652) 2023-02-13 14:53:29 -08:00
cycle_state_test.go Copy recordPluginMetrics in CycleState.Clone 2022-04-14 15:26:20 +00:00
extender.go multiple extenders and UnschedulableAndUnresolvable takes precedence 2021-01-29 11:32:43 +08:00
interface.go feature(scheduler): implement ClusterEventWithHint to filter out useless events 2023-06-22 13:36:19 +00:00
interface_test.go Use the generic Set in scheduler 2023-04-09 11:34:17 +05:30
listers.go Adding StorageInfoLister to SharedLister 2022-05-03 18:00:41 -07:00
types.go Merge pull request #119046 from kerthcet/fix/handle-unschedule-plugins 2023-07-06 21:01:03 -07:00
types_test.go Support fine-gained rescheduling in ReservePlugin 2023-07-07 13:30:29 +08:00