reconciler

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 22 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"
)
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 HashServiceSpec added in v0.18.0

func HashServiceSpec(spec corev1.ServiceSpec) string

HashServiceSpec calculates a hash given a copy of the service spec

func Pod

func Pod(source *v1alpha1.CatalogSource, name string, image string, saName string, labels map[string]string, annotations map[string]string, readinessDelay int32, livenessDelay int32) *v1.Pod

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(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(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(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(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(catalogSource *v1alpha1.CatalogSource) (healthy bool, err error)

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

func (*GrpcRegistryReconciler) EnsureRegistryServer

func (c *GrpcRegistryReconciler) EnsureRegistryServer(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(catalogSource *v1alpha1.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(catalogSource *v1alpha1.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 *v1alpha1.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) 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