controller

package
v0.49.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 36 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Informer factory
	KubeInformerFactory        informers.SharedInformerFactory
	KubedbInformerFactory      kubedbinformers.SharedInformerFactory
	AppCatInformerFactory      appcat_in.SharedInformerFactory
	CertManagerInformerFactory cmInformers.SharedInformerFactory
	PetSetInformerFactory      psinformer.SharedInformerFactory

	// External tool to initialize the database
	Initializers Initializers

	// Secret
	SecretInformer cache.SharedIndexInformer
	SecretLister   corelisters.SecretLister

	// PetSet Watcher
	PSQueue    *queue.Worker
	PSInformer cache.SharedIndexInformer
	PSLister   pslister.PetSetLister

	// Only watch or reconcile objects in this namespace (usually for license reasons)
	RestrictToNamespace    string
	ResyncPeriod           time.Duration
	ReadinessProbeInterval time.Duration
	MaxNumRequeues         int
	NumThreads             int
	NetworkPolicyEnabled   bool
}

type Controller

type Controller struct {
	ClientConfig *rest.Config
	// KubeBuilder Client
	KBClient client.Client
	// Kubernetes client
	Client kubernetes.Interface
	// KubeDB client
	DBClient cs.Interface
	// PetSet client
	PSClient petsetcs.Interface
	// Dynamic client
	DynamicClient dynamic.Interface
	// AppCatalog client
	AppCatalogClient appcat_cs.Interface
	// Cluster topology when the operator started
	ClusterTopology *core_util.Topology
	// Event Recorder
	Recorder record.EventRecorder
	// Audit Event Publisher
	Auditor *auditlib.EventPublisher
}

func (*Controller) CreateDeploymentPodDisruptionBudget

func (c *Controller) CreateDeploymentPodDisruptionBudget(deployment *apps.Deployment) error

func (*Controller) SyncPetSetPDBWithCustomLabelSelectors added in v0.44.0

func (c *Controller) SyncPetSetPDBWithCustomLabelSelectors(ps *psapi.PetSet, replicas int32, labels map[string]string, matchLabelSelectors map[string]string) error

func (*Controller) SyncPetSetPodDisruptionBudget added in v0.44.0

func (c *Controller) SyncPetSetPodDisruptionBudget(ps *psapi.PetSet) error

SyncPetSetPodDisruptionBudget syncs the PDB with the current state of the petSet. The maxUnavailable is calculated based petSet replica count, maxUnavailable = (replicas-1)/2. Also cleanup the PDB, when replica count is 1 or less.

type Initializers

type Initializers struct {
	Stash StashInitializer
}

type StashInitializer

type StashInitializer struct {
	StashClient          scs.Interface
	StashInformerFactory stashinformer.SharedInformerFactory
	// StashInitializer RestoreSession
	RSQueue    *queue.Worker
	RSInformer cache.SharedIndexInformer
	RSLister   lister.RestoreSessionLister

	// StashInitializer RestoreBatch
	RBQueue    *queue.Worker
	RBInformer cache.SharedIndexInformer
	RBLister   lister.RestoreBatchLister
}

Directories

Path Synopsis
initializer

Jump to

Keyboard shortcuts

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