kubernetes/pkg/controller/volume/pvcprotection/pvc_protection_controller.go

type LazyLivePodList

func (ll *LazyLivePodList) getCache() []v1.Pod {}

func (ll *LazyLivePodList) setCache(pods []v1.Pod) {}

type pvcData

type pvcProcessingStore

func NewPVCProcessingStore() *pvcProcessingStore {}

func (m *pvcProcessingStore) addOrUpdate(namespace string, pvcKey, pvcName string) {}

// Returns a list of pvcs and the associated namespace to be processed downstream
func (m *pvcProcessingStore) flushNextPVCsByNamespace() ([]pvcData, string) {}

type Controller

// NewPVCProtectionController returns a new instance of PVCProtectionController.
func NewPVCProtectionController(logger klog.Logger, pvcInformer coreinformers.PersistentVolumeClaimInformer, podInformer coreinformers.PodInformer, cl clientset.Interface) (*Controller, error) {}

// Run runs the controller goroutines.
func (c *Controller) Run(ctx context.Context, workers int) {}

// Main worker batch-pulls PVC items off informer's work queue and populates namespace queue and namespace-PVCs map
func (c *Controller) runMainWorker(ctx context.Context) {}

// Consumer worker pulls items off namespace queue and processes associated PVCs
func (c *Controller) runProcessNamespaceWorker(ctx context.Context) {}

func (c *Controller) processNextWorkItem() bool {}

func (c *Controller) processPVCsByNamespace(ctx context.Context) bool {}

func (c *Controller) processPVC(ctx context.Context, pvcNamespace, pvcName string, lazyLivePodList *LazyLivePodList) error {}

func (c *Controller) addFinalizer(ctx context.Context, pvc *v1.PersistentVolumeClaim) error {}

func (c *Controller) removeFinalizer(ctx context.Context, pvc *v1.PersistentVolumeClaim) error {}

func (c *Controller) isBeingUsed(ctx context.Context, pvc *v1.PersistentVolumeClaim, lazyLivePodList *LazyLivePodList) (bool, error) {}

func (c *Controller) askInformer(logger klog.Logger, pvc *v1.PersistentVolumeClaim) (bool, error) {}

func (c *Controller) askAPIServer(ctx context.Context, pvc *v1.PersistentVolumeClaim, lazyLivePodList *LazyLivePodList) (bool, error) {}

func (c *Controller) podUsesPVC(logger klog.Logger, pod *v1.Pod, pvc *v1.PersistentVolumeClaim) bool {}

// podIsShutDown returns true if kubelet is done with the pod or
// it was force-deleted.
func podIsShutDown(pod *v1.Pod) bool {}

// pvcAddedUpdated reacts to pvc added/updated events
func (c *Controller) pvcAddedUpdated(logger klog.Logger, obj interface{}

// podAddedDeletedUpdated reacts to Pod events
func (c *Controller) podAddedDeletedUpdated(logger klog.Logger, old, new interface{}

func (*Controller) parsePod(obj interface{}

func (c *Controller) enqueuePVCs(logger klog.Logger, pod *v1.Pod, deleted bool) {}