Help us shape the future of Go! Take the 2026 Go Developer Survey

reconciler

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CatalogSourceUpdateKey      = "catalogsource.operators.coreos.com/update"
	ServiceHashLabelKey         = "olm.service-spec-hash"
	CatalogPollingRequeuePeriod = 30 * time.Second
)
View Source
const (
	// CatalogSourceLabelKey is the key for a label containing a CatalogSource name.
	CatalogSourceLabelKey string = "olm.catalogSource"
	// CatalogPriorityClassKey is the key of an annotation in default catalogsources
	CatalogPriorityClassKey string = "operatorframework.io/priorityclass"
	// PodHashLabelKey is the key of a label for podspec hash information
	PodHashLabelKey = "olm.pod-spec-hash"
	//ClusterAutoscalingAnnotationKey is the annotation that enables the cluster autoscaler to evict catalog pods
	ClusterAutoscalingAnnotationKey string = "cluster-autoscaler.kubernetes.io/safe-to-evict"
)
View Source
const (
	// ConfigMapRVLabelKey is the key for a label used to track the resource version of a related ConfigMap.
	ConfigMapRVLabelKey string = "olm.configMapResourceVersion"
)
View Source
const (
	// ConfigMapServerPostfix is a postfix appended to the names of resources generated for a ConfigMap server.
	ConfigMapServerPostfix string = "-configmap-server"
)

Variables

This section is empty.

Functions

func DesiredGRPCServerNetworkPolicy added in v0.32.0

func DesiredGRPCServerNetworkPolicy(catalogSource *v1alpha1.CatalogSource, matchLabels map[string]string) *networkingv1.NetworkPolicy

func DesiredUnpackBundlesNetworkPolicy added in v0.32.0

func DesiredUnpackBundlesNetworkPolicy(catalogSource client.Object) *networkingv1.NetworkPolicy

func Pod

func Pod(source *operatorsv1alpha1.CatalogSource, name, opmImg, utilImage, img string, serviceAccount *corev1.ServiceAccount, labels, annotations map[string]string, readinessDelay, livenessDelay int32, runAsUser int64, defaultSecurityConfig operatorsv1alpha1.SecurityConfig) (*corev1.Pod, error)

func ServiceHashMatch added in v0.18.0

func ServiceHashMatch(existing, new *corev1.Service) bool

ServiceHashMatch will check the hash info in existing Service to ensure its hash info matches the desired Service's hash.

func SyncRegistryUpdateInterval

func SyncRegistryUpdateInterval(source *v1alpha1.CatalogSource, now time.Time) time.Duration

SyncRegistryUpdateInterval returns a duration to use when requeuing the catalog source for reconciliation. This ensures that the catalog is being synced on the correct time interval based on its spec. Note: this function assumes the catalog has an update strategy set.

Types

type ConfigMapRegistryReconciler

type ConfigMapRegistryReconciler struct {
	Lister   operatorlister.OperatorLister
	OpClient operatorclient.ClientInterface
	Image    string
	// contains filtered or unexported fields
}

func (*ConfigMapRegistryReconciler) CheckRegistryServer

func (c *ConfigMapRegistryReconciler) CheckRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) (healthy bool, err error)

CheckRegistryServer returns true if the given CatalogSource is considered healthy; false otherwise.

func (*ConfigMapRegistryReconciler) EnsureRegistryServer

func (c *ConfigMapRegistryReconciler) EnsureRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) error

EnsureRegistryServer ensures that all components of registry server are up to date.

type GrpcAddressRegistryReconciler

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

func (*GrpcAddressRegistryReconciler) CheckRegistryServer

func (g *GrpcAddressRegistryReconciler) CheckRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) (healthy bool, err error)

CheckRegistryServer returns true if the given CatalogSource is considered healthy; false otherwise.

func (*GrpcAddressRegistryReconciler) EnsureRegistryServer

func (g *GrpcAddressRegistryReconciler) EnsureRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) error

EnsureRegistryServer ensures a registry server exists for the given CatalogSource.

type GrpcRegistryReconciler

type GrpcRegistryReconciler struct {
	Lister    operatorlister.OperatorLister
	OpClient  operatorclient.ClientInterface
	SSAClient *controllerclient.ServerSideApplier
	// contains filtered or unexported fields
}

func (*GrpcRegistryReconciler) CheckRegistryServer

func (c *GrpcRegistryReconciler) CheckRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) (bool, error)

CheckRegistryServer returns true if the given CatalogSource is considered healthy; false otherwise.

func (*GrpcRegistryReconciler) EnsureRegistryServer

func (c *GrpcRegistryReconciler) EnsureRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) error

EnsureRegistryServer ensures that all components of registry server are up to date.

type RegistryChecker

type RegistryChecker interface {
	// CheckRegistryServer returns true if the given CatalogSource is considered healthy; false otherwise.
	CheckRegistryServer(logger *logrus.Entry, catalogSource *operatorsv1alpha1.CatalogSource) (healthy bool, err error)
}

RegistryChecker describes methods for checking a registry.

type RegistryEnsurer

type RegistryEnsurer interface {
	// EnsureRegistryServer ensures a registry server exists for the given CatalogSource.
	EnsureRegistryServer(logger *logrus.Entry, catalogSource *operatorsv1alpha1.CatalogSource) error
}

RegistryEnsurer describes methods for ensuring a registry exists.

type RegistryReconciler

type RegistryReconciler interface {
	RegistryChecker
	RegistryEnsurer
}

RegistryReconciler knows how to reconcile a registry.

type RegistryReconcilerFactory

type RegistryReconcilerFactory interface {
	ReconcilerForSource(source *operatorsv1alpha1.CatalogSource) RegistryReconciler
}

RegistryReconcilerFactory describes factory methods for RegistryReconcilers.

func NewRegistryReconcilerFactory

func NewRegistryReconcilerFactory(lister operatorlister.OperatorLister, opClient operatorclient.ClientInterface, configMapServerImage string, now nowFunc, ssaClient *controllerclient.ServerSideApplier, createPodAsUser int64, opmImage, utilImage string) RegistryReconcilerFactory

NewRegistryReconcilerFactory returns an initialized RegistryReconcilerFactory.

type UpdateNotReadyErr

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

func (UpdateNotReadyErr) Error

func (u UpdateNotReadyErr) Error() string

Jump to

Keyboard shortcuts

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