staticpod

package
v0.0.0-...-1f32fc6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 32 Imported by: 5 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFileAtomic

func WriteFileAtomic(content []byte, filePerms os.FileMode, fullFilename string) error

Types

type Builder

type Builder interface {
	WithEvents(eventRecorder events.Recorder) Builder
	WithVersioning(operandName string, versionRecorder status.VersionGetter) Builder
	WithOperandPodLabelSelector(labelSelector labels.Selector) Builder
	WithRevisionedResources(operandNamespace, staticPodName string, revisionConfigMaps, revisionSecrets []revisioncontroller.RevisionResource) Builder
	WithUnrevisionedCerts(certDir string, certConfigMaps, certSecrets []installer.UnrevisionedResource) Builder
	WithInstaller(command []string) Builder
	WithMinReadyDuration(minReadyDuration time.Duration) Builder
	WithStartupMonitor(enabledStartupMonitor func() (bool, error)) Builder

	// WithExtraNodeSelector Informs controllers to handle extra nodes as well as master nodes.
	WithExtraNodeSelector(extraNodeSelector labels.Selector) Builder

	// WithCustomInstaller allows mutating the installer pod definition just before
	// the installer pod is created for a revision.
	WithCustomInstaller(command []string, installerPodMutationFunc installer.InstallerPodMutationFunc) Builder
	WithPruning(command []string, staticPodPrefix string) Builder

	// WithPodDisruptionBudgetGuard manages guard pods and high available pod disruption budget
	//
	// optionally pdbUnhealthyPodEvictionPolicy can be set to AlwaysAllow to allows eviction of unhealthy (not ready) pods
	// even if there are no disruptions allowed on a PodDisruptionBudget.
	// This can help to drain/maintain a node and recover without a manual intervention when multiple instances of nodes or pods are misbehaving.
	// Use this with caution, as this option can disrupt perspective pods that have not yet had a chance to become healthy.
	WithPodDisruptionBudgetGuard(operatorNamespace, operatorName, readyzPort, readyzEndpoint string, pdbUnhealthyPodEvictionPolicy *v1.UnhealthyPodEvictionPolicyType, createConditionalFunc func() (bool, bool, error)) Builder
	WithRevisionControllerPrecondition(revisionControllerPrecondition revisioncontroller.PreconditionFunc) Builder
	WithRevisionControllerReadinessCheck(revisionControllerReadinessCheck revisioncontroller.ReadinessCheckFunc) Builder
	ToControllers() (manager.ControllerManager, error)
}

Builder allows the caller to construct a set of static pod controllers in pieces

func NewBuilder

func NewBuilder(
	staticPodOperatorClient v1helpers.StaticPodOperatorClient,
	kubeClient kubernetes.Interface,
	kubeNamespaceInformers v1helpers.KubeInformersForNamespaces,
	clusterInformers informers.SharedInformerFactory,
	configInformers externalversions.SharedInformerFactory,
	clock clock.Clock,
) Builder

Directories

Path Synopsis
controller
atomicdir/types
Package types exists to avoid import cycles as it's imported by both atomicdir and atomicdir/testing.
Package types exists to avoid import cycles as it's imported by both atomicdir and atomicdir/testing.

Jump to

Keyboard shortcuts

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