daemon

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 38 Imported by: 98

Documentation

Overview

Package daemon contains logic for watching and synchronizing daemons.

Index

Constants

View Source
const (
	// BurstReplicas is a rate limiter for booting pods on a lot of pods.
	// The value of 250 is chosen b/c values that are too high can cause registry DoS issues.
	BurstReplicas = 250

	// StatusUpdateRetries limits the number of retries if sending a status update to API server fails.
	StatusUpdateRetries = 1

	// BackoffGCInterval is the time that has to pass before next iteration of backoff GC is run
	BackoffGCInterval = 1 * time.Minute
)
View Source
const (
	// SelectingAllReason is added to an event when a DaemonSet selects all Pods.
	SelectingAllReason = "SelectingAll"
	// FailedPlacementReason is added to an event when a DaemonSet can't schedule a Pod to a specified node.
	FailedPlacementReason = "FailedPlacement"
	// FailedDaemonPodReason is added to an event when the status of a Pod of a DaemonSet is 'Failed'.
	FailedDaemonPodReason = "FailedDaemonPod"
	// SucceededDaemonPodReason is added to an event when the status of a Pod of a DaemonSet is 'Succeeded'.
	SucceededDaemonPodReason = "SucceededDaemonPod"
)

Reasons for DaemonSet events

Variables

This section is empty.

Functions

func Match added in v1.7.0

func Match(ds *apps.DaemonSet, history *apps.ControllerRevision) (bool, error)

Match check if the given DaemonSet's template matches the template stored in the given history.

func NewPod added in v1.6.0

func NewPod(ds *apps.DaemonSet, nodeName string) *v1.Pod

NewPod creates a new pod

func NodeShouldRunDaemonPod added in v1.24.0

func NodeShouldRunDaemonPod(node *v1.Node, ds *apps.DaemonSet) (bool, bool)

NodeShouldRunDaemonPod checks a set of preconditions against a (node,daemonset) and returns a summary. Returned booleans are:

  • shouldRun: Returns true when a daemonset should run on the node if a daemonset pod is not already running on that node.
  • shouldContinueRunning: Returns true when a daemonset should continue running on a node if a daemonset pod is already running on that node.

Types

type DaemonSetsController

type DaemonSetsController struct {
	// contains filtered or unexported fields
}

DaemonSetsController is responsible for synchronizing DaemonSet objects stored in the system with actual running pods.

func NewDaemonSetsController

func NewDaemonSetsController(
	ctx context.Context,
	daemonSetInformer appsinformers.DaemonSetInformer,
	historyInformer appsinformers.ControllerRevisionInformer,
	podInformer coreinformers.PodInformer,
	nodeInformer coreinformers.NodeInformer,
	kubeClient clientset.Interface,
	failedPodsBackoff *flowcontrol.Backoff,
) (*DaemonSetsController, error)

NewDaemonSetsController creates a new DaemonSetsController

func (*DaemonSetsController) Run

func (dsc *DaemonSetsController) Run(ctx context.Context, workers int)

Run begins watching and syncing daemon sets.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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