kube-controller-manager: add ResourceClaim controller

The controller uses the exact same logic as the generic ephemeral inline volume
controller, just for inline ResourceClaimTemplate -> ResourceClaim.

In addition, it supports removal of pods from the ReservedFor field when those
pods are known to not need the claim anymore. At the moment, only this special
case is supported. Removal of arbitrary objects would imply granting full read
access to all types to determine whether a) an object is gone and b) if the
current incarnation is the one which is listed in ReservedFor. This may get
added later.
This commit is contained in:
Patrick Ohly
2022-03-22 16:56:49 +01:00
parent b87530af4f
commit 0133df3929
23 changed files with 624 additions and 545 deletions

1
go.mod
View File

@@ -107,6 +107,7 @@ require (
k8s.io/controller-manager v0.0.0
k8s.io/cri-api v0.0.0
k8s.io/csi-translation-lib v0.0.0
k8s.io/dynamic-resource-allocation v0.0.0
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d
k8s.io/klog/v2 v2.80.1
k8s.io/kms v0.0.0