kubernetes/pkg/controller/resourceclaim/controller.go

const podResourceClaimIndex

const podResourceClaimAnnotation

const claimPodOwnerIndex

const fieldManager

const maxUIDCacheEntries

type Controller

const claimKeyPrefix

const podKeyPrefix

// NewController creates a ResourceClaim controller.
func NewController(
	logger klog.Logger,
	kubeClient clientset.Interface,
	podInformer v1informers.PodInformer,
	claimInformer resourceinformers.ResourceClaimInformer,
	templateInformer resourceinformers.ResourceClaimTemplateInformer) (*Controller, error) {}

func (ec *Controller) enqueuePod(logger klog.Logger, obj interface{}

func podNeedsClaims(pod *v1.Pod, deleted bool) (bool, string) {}

// podNeedsWork checks whether a new or modified pod needs to be processed
// further by a worker. It returns a boolean with the result and an explanation
// for it.
func (ec *Controller) podNeedsWork(pod *v1.Pod) (bool, string) {}

func (ec *Controller) enqueueResourceClaim(logger klog.Logger, obj interface{}

func (ec *Controller) Run(ctx context.Context, workers int) {}

func (ec *Controller) runWorker(ctx context.Context) {}

func (ec *Controller) processNextWorkItem(ctx context.Context) bool {}

// syncHandler is invoked for each work item which might need to be processed.
// If an error is returned from this function, the item will be requeued.
func (ec *Controller) syncHandler(ctx context.Context, key string) error {}

func (ec *Controller) syncPod(ctx context.Context, namespace, name string) error {}

// handleClaim is invoked for each resource claim of a pod.
func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1.PodResourceClaim, newPodClaims *map[string]string) error {}

// findPodResourceClaim looks for an existing ResourceClaim with the right
// annotation (ties it to the pod claim) and the right ownership (ties it to
// the pod).
func (ec *Controller) findPodResourceClaim(pod *v1.Pod, podClaim v1.PodResourceClaim) (*resourceapi.ResourceClaim, error) {}

func (ec *Controller) reserveForPod(ctx context.Context, pod *v1.Pod, claim *resourceapi.ResourceClaim) error {}

func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) error {}

func owningPod(claim *resourceapi.ResourceClaim) (string, types.UID) {}

// podResourceClaimIndexFunc is an index function that returns ResourceClaim keys (=
// namespace/name) for ResourceClaim or ResourceClaimTemplates in a given pod.
func podResourceClaimIndexFunc(obj interface{}

// isPodDone returns true if it is certain that none of the containers are running and never will run.
func isPodDone(pod *v1.Pod) bool {}

// claimPodOwnerIndexFunc is an index function that returns the pod UIDs of
// all pods which own the resource claim. Should only be one, though.
func claimPodOwnerIndexFunc(obj interface{}