kubernetes/pkg
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
..
api dra: generated name for ResourceClaim from template 2023-07-11 14:23:48 +02:00
apis dra: generated name for ResourceClaim from template 2023-07-11 14:23:48 +02:00
auth Merge pull request #105598 from gy95/match 2022-01-05 09:22:38 -08:00
capabilities initialize capabilities unit test 2021-03-13 10:53:47 +01:00
client Move cri/streaming to k8s.io/kubelet staging repository 2023-06-05 08:08:18 +02:00
cloudprovider lavalamp is taking a long break 2023-05-11 16:43:38 +00:00
cluster/ports Webhook framework for cloud controller manager 2023-03-14 23:28:05 +00:00
controller dra: generated name for ResourceClaim from template 2023-07-11 14:23:48 +02:00
controlplane SPLIT: kube-apiserver/corerest: split out service IP setup logic 2023-07-05 11:00:37 +02:00
credentialprovider fix fd leaks and failed file removing for main pkg and cmd 2023-05-09 09:24:11 -05:00
features Sidecar: API changes 2023-07-07 21:39:34 +00:00
fieldpath Improved FormatMap: Improves performance by about 4x, or nearly 2x in the worst case (#112661) 2023-03-01 22:26:55 -08:00
generated Sidecar: Generated code 2023-07-07 21:39:35 +00:00
kubeapiserver Add api-machinery TL owners permissions for jpbetz 2023-05-15 11:09:54 -04:00
kubectl Merge pull request #117102 from ardaguclu/move-genericiooptions 2023-04-11 20:21:17 -07:00
kubelet dra: generated name for ResourceClaim from template 2023-07-11 14:23:48 +02:00
kubemark Move hollow_proxy.go from pkg/kubemark to pkg/proxy/kubemark 2023-03-16 09:47:54 -04:00
printers Sidecar: Update printPod to show restartable init container information 2023-07-08 07:26:13 +09:00
probe Merge pull request #114606 from tuunit/bugfix-case-sensitive-headers 2023-05-15 22:05:36 -07:00
proxy Merge pull request #118999 from cezarygerard/health-service 2023-07-07 15:49:05 -07:00
quota/v1 benchmark test to evaluate the overhead of podMatchesScopeFunc 2023-05-04 17:02:47 -07:00
registry SPLIT: kube-apiserver/corerest: split out service IP setup logic 2023-07-05 11:00:37 +02:00
routes Add api-machinery TL owners permissions for jpbetz 2023-05-15 11:09:54 -04:00
scheduler dra: generated name for ResourceClaim from template 2023-07-11 14:23:48 +02:00
security AppArmor no reevaluation of host is needed 2023-03-14 18:35:01 +00:00
securitycontext add SeccompProfile to Pod and Container accessors/mutators 2023-02-22 17:15:27 +01:00
serviceaccount graduate LegacyServiceAccountTokenTracking to GA 2023-05-19 10:33:34 -07:00
util Merge pull request #118338 from aroradaman/mv-ipset 2023-06-09 08:14:24 -07:00
volume Merge pull request #117055 from cyclinder/csi_migration 2023-06-28 04:28:31 -07:00
windows/service Fix typo at pkg/windows/service/service.go:94 2022-03-24 07:25:33 -04:00
.import-restrictions
OWNERS lavalamp is taking a long break 2023-05-11 16:43:38 +00:00