Documentation ¶
Index ¶
- Constants
- func Pod(source *operatorsv1alpha1.CatalogSource, name, opmImg, utilImage, img string, ...) (*corev1.Pod, error)
- func ServiceHashMatch(existing, new *corev1.Service) bool
- func SyncRegistryUpdateInterval(source *v1alpha1.CatalogSource, now time.Time) time.Duration
- type ConfigMapRegistryReconciler
- type GrpcAddressRegistryReconciler
- type GrpcRegistryReconciler
- type RegistryChecker
- type RegistryEnsurer
- type RegistryReconciler
- type RegistryReconcilerFactory
- type UpdateNotReadyErr
Constants ¶
const ( CatalogSourceUpdateKey = "catalogsource.operators.coreos.com/update" ServiceHashLabelKey = "olm.service-spec-hash" CatalogPollingRequeuePeriod = 30 * time.Second )
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" )
const ( // ConfigMapRVLabelKey is the key for a label used to track the resource version of a related ConfigMap. ConfigMapRVLabelKey string = "olm.configMapResourceVersion" )
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 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
ServiceHashMatch will check the hash info in existing Service to ensure its hash info matches the desired Service's hash.
func SyncRegistryUpdateInterval ¶
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