kubernetes/pkg/controller
Patrick Ohly 80ab8f0542 dra: handle scheduled pods in kube-controller-manager
When someone decides that a Pod should definitely run on a specific node, they
can create the Pod with spec.nodeName already set. Some custom scheduler might
do that. Then kubelet starts to check the pod and (if DRA is enabled) will
refuse to run it, either because the claims are still waiting for the first
consumer or the pod wasn't added to reservedFor. Both are things the scheduler
normally does.

Also, if a pod got scheduled while the DRA feature was off in the
kube-scheduler, a pod can reach the same state.

The resource claim controller can handle these two cases by taking over for the
kube-scheduler when nodeName is set. Triggering an allocation is simpler than
in the scheduler because all it takes is creating the right
PodSchedulingContext with spec.selectedNode set. There's no need to list nodes
because that choice was already made, permanently. Adding the pod to
reservedFor also isn't hard.

What's currently missing is triggering de-allocation of claims to re-allocate
them for the desired node. This is not important for claims that get created
for the pod from a template and then only get used once, but it might be
worthwhile to add de-allocation in the future.
2023-07-13 21:27:11 +02:00
..
apis/config implement LegacyServiceAccountTokenCleanUp alpha 2023-05-24 23:20:17 +00:00
bootstrap replace spew methods with dump methods 2023-04-14 08:05:53 +08:00
certificates Merge pull request #113994 from mengjiao-liu/contextual-logging-controller-certificates 2023-06-21 09:03:42 -07:00
clusterroleaggregation Replace uses of diff.ObjectDiff with cmp.Diff 2023-04-12 08:46:12 -07:00
cronjob feat: Append job creation timestamp to cronjob annotations (#118137) 2023-07-06 14:39:04 -07:00
daemon Merge pull request #118917 from kmala/daemonsetfix 2023-06-28 00:08:32 -07:00
deployment Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
disruption apps: replace intstr.FromInt with intstr.FromInt32 2023-05-01 09:17:05 +02:00
endpoint Merge pull request #116755 from my-git9/feat/endpoint/logging 2023-07-10 05:37:05 -07:00
endpointslice migrated pkg/controller/endpointslice to contextual logging 2023-07-11 01:28:22 +05:30
endpointslicemirroring migrated pkg/controller/endpointslicemirroring to contextual logging 2023-07-11 01:43:30 +05:30
garbagecollector Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
history convert int32 to pointer using library function 2022-07-01 14:58:26 +08:00
job Remarks to syncJobCtx 2023-07-11 09:44:08 +02:00
namespace namespace controller: use contextual logging 2023-03-13 14:59:17 +08:00
nodeipam Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
nodelifecycle Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
podautoscaler Merge pull request #118173 from huiwq1990/feat-autoscale-variable 2023-07-02 23:00:50 -07:00
podgc delete Evicted pods first during pod gc 2023-03-07 10:11:01 +08:00
replicaset Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
replication Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
resourceclaim dra: handle scheduled pods in kube-controller-manager 2023-07-13 21:27:11 +02:00
resourcequota delete unused functions in pkg/controller directory 2023-03-28 22:41:20 +08:00
serviceaccount implement LegacyServiceAccountTokenCleanUp alpha 2023-05-24 23:20:17 +00:00
statefulset Add unit tests for parallel StatefulSet create & delete 2023-06-28 16:55:38 +02:00
storageversiongc Merge pull request #113986 from songxiao-wang87/runwxs-test2 2023-03-07 04:19:43 -08:00
testutil Merge pull request #114061 from Octopusjust/k8s-pr15 2023-07-05 08:38:57 -07:00
ttl Making a run test. 2023-01-28 03:14:57 +00:00
ttlafterfinished Make use of k8s.io/utils/pointer.Duration 2023-06-18 21:46:26 +03:00
util Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
volume Add reason to force detach metric 2023-07-10 06:30:05 +00:00
controller_ref_manager_test.go Merge pull request #101250 from evertrain/master 2021-11-10 09:19:26 -08:00
controller_ref_manager.go Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
controller_utils_test.go Use cmp diff 2023-07-06 23:01:06 -05:00
controller_utils.go Fix race in logging expectations 2023-06-19 13:26:39 -04:00
doc.go
OWNERS add myself as approver to pkg/controller 2022-01-12 19:33:02 -05:00