Documentation ¶
Index ¶
- Constants
- func HashServiceSpec(spec corev1.ServiceSpec) string
- func Pod(source *operatorsv1alpha1.CatalogSource, name string, img string, ...) *corev1.Pod
- 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" //ClusterAutoscalingAnnotation 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 HashServiceSpec ¶ added in v0.18.0
func HashServiceSpec(spec corev1.ServiceSpec) string
HashServiceSpec calculates a hash given a copy of the service spec
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(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 *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(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) RegistryReconcilerFactory
NewRegistryReconcilerFactory returns an initialized RegistryReconcilerFactory.
type UpdateNotReadyErr ¶
type UpdateNotReadyErr struct {
// contains filtered or unexported fields
}
func (UpdateNotReadyErr) Error ¶
func (u UpdateNotReadyErr) Error() string