kubernetes/pkg/controller
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
..
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 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +08:00
endpointslice Merge pull request #116732 from czybjtu/cleanup_map_to_sets 2023-06-07 07:38:13 -07:00
endpointslicemirroring endpointslicemirroring handle endpoints with multiple subsets 2022-12-10 11:44:10 +00:00
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 Only declare job as finished after removing all finalizers 2023-07-07 14:08:19 -04: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: generated name for ResourceClaim from template 2023-07-11 14:23:48 +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 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging 2023-07-06 07:39:52 +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_ref_manager_test.go Merge pull request #101250 from evertrain/master 2021-11-10 09:19:26 -08:00
controller_utils.go Fix race in logging expectations 2023-06-19 13:26:39 -04:00
controller_utils_test.go controller: add non-exist node test case 2022-11-10 09:43:53 +08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
OWNERS add myself as approver to pkg/controller 2022-01-12 19:33:02 -05:00