controller

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPodInformerFactory added in v0.39.0

func NewPodInformerFactory(kubeClient kubernetes.Interface, namespace string) informers.SharedInformerFactory

NewPodInformerFactory returns the shared pod informer factory. Both the rollout controller and the ZPDB eviction controller need a full view of the pods in the namespace, so they are given the same factory: one each would mean two watches and two in-memory copies of every pod, which on a large cell is thousands of objects held twice.

Types

type RolloutController

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

func NewRolloutController

func NewRolloutController(kubeClient kubernetes.Interface, discoveryClient discovery.DiscoveryInterface, restMapper meta.RESTMapper, scaleClient scale.ScalesGetter, dynamic dynamic.Interface, clusterDomain string, namespace string, podsFactory informers.SharedInformerFactory, podHTTPClient *instrumentation.PodHTTPClient, reconcileInterval time.Duration, reg prometheus.Registerer, logger log.Logger, zpdbController ZPDBEvictionController) *RolloutController

func (*RolloutController) AllowMissingCRDs added in v0.42.0

func (c *RolloutController) AllowMissingCRDs()

AllowMissingCRDs lets Init return before the ReplicaTemplate informer syncs. When discovery first finds the CRD, it enqueues a reconcile. Call before Init.

func (*RolloutController) Init

func (c *RolloutController) Init() error

Init the controller.

func (*RolloutController) Run

func (c *RolloutController) Run()

Run runs the controller and blocks until Stop() is called.

func (*RolloutController) Snapshot added in v0.41.0

func (c *RolloutController) Snapshot(ctx context.Context) (*status.Snapshot, error)

Snapshot builds a read-only rollout status view from informer caches.

func (*RolloutController) Stop

func (c *RolloutController) Stop()

Stop the controller.

func (*RolloutController) WatchReplicaTemplates added in v0.41.0

func (c *RolloutController) WatchReplicaTemplates()

WatchReplicaTemplates enables prompt reconciliation of desired replica changes. Call before Init with list/watch permissions; the informer retries until the CRD is available.

type ZPDBEvictionController added in v0.32.0

type ZPDBEvictionController interface {
	MarkPodAsDeleted(ctx context.Context, namespace string, podName string, source string, override zpdb.MaxUnavailableZeroOverride) error
	HasPartitionAwarePdb(pod *corev1.Pod) (bool, error)
}

Jump to

Keyboard shortcuts

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