populator

package
v0.0.0-...-4f3658d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package populator implements interfaces that monitor and keep the states of the caches in sync with the "ground truth".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DesiredStateOfWorldPopulator

type DesiredStateOfWorldPopulator interface {
	Run(stopCh <-chan struct{})

	// ReprocessPod removes the specified pod from the list of processedPods
	// (if it exists) forcing it to be reprocessed. This is required to enable
	// remounting volumes on pod updates (volumes like Downward API volumes
	// depend on this behavior to ensure volume content is updated).
	ReprocessPod(podName volumetypes.UniquePodName)
}

DesiredStateOfWorldPopulator periodically loops through the list of active pods and ensures that each one exists in the desired state of the world cache if it has volumes. It also verifies that the pods in the desired state of the world cache still exist, if not, it removes them.

func NewDesiredStateOfWorldPopulator

func NewDesiredStateOfWorldPopulator(
	kubeClient clientset.Interface,
	loopSleepDuration time.Duration,
	getPodStatusRetryDuration time.Duration,
	podManager pod.Manager,
	podStatusProvider status.PodStatusProvider,
	desiredStateOfWorld cache.DesiredStateOfWorld,
	kubeContainerRuntime kubecontainer.Runtime,
	keepTerminatedPodVolumes bool) DesiredStateOfWorldPopulator

NewDesiredStateOfWorldPopulator returns a new instance of DesiredStateOfWorldPopulator.

kubeClient - used to fetch PV and PVC objects from the API server loopSleepDuration - the amount of time the populator loop sleeps between

successive executions

podManager - the kubelet podManager that is the source of truth for the pods

that exist on this host

desiredStateOfWorld - the cache to populate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL