Documentation ¶
Index ¶
- Constants
- Variables
- func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
- func APIKeyToGVKString(key opregistry.APIKey) string
- func LabelSetsFor(obj interface{}) ([]labels.Set, error)
- func Matches(o *Operator, p ...OperatorPredicate) bool
- func NewInvalidSubscriptionInstallable(name string, reason string) solver.Installable
- func NewServiceAccountStepResources(csv *v1alpha1.ClusterServiceVersion, ...) ([]v1alpha1.StepResource, error)
- func NewSingleAPIProviderInstallable(group, version, kind string, providers []solver.Identifier) solver.Installable
- func NewSinglePackageInstanceInstallable(pkg string, providers []solver.Identifier) solver.Installable
- func NewStepResourceFromBundle(bundle *api.Bundle, ...) ([]v1alpha1.StepResource, error)
- func NewStepResourceFromObject(obj runtime.Object, catalogSourceName, catalogSourceNamespace string) (v1alpha1.StepResource, error)
- func NewStepsFromBundle(bundle *api.Bundle, ...) ([]*v1alpha1.Step, error)
- func NewSubscriptionInstallable(name string, dependencies []solver.Identifier) solver.Installable
- func NewSubscriptionStepResource(namespace string, info OperatorSourceInfo) (v1alpha1.StepResource, error)
- func PrettyConstraint(c solver.Constraint, msg string) solver.Constraint
- func RBACForClusterServiceVersion(csv *v1alpha1.ClusterServiceVersion) (map[string]*OperatorPermissions, error)
- func V1alpha1CSVFromBundle(bundle *api.Bundle) (*v1alpha1.ClusterServiceVersion, error)
- type APIIntersectionReconcileFunc
- type APIIntersectionReconciler
- type APIMultiOwnerSet
- type APIOwnerSet
- type APIReconciliationResult
- type APISet
- func (s APISet) Difference(set APISet) APISet
- func (s APISet) Intersection(sets ...APISet) APISet
- func (s APISet) IsSubset(set APISet) bool
- func (s APISet) PopAPIKey() *opregistry.APIKey
- func (s APISet) String() string
- func (s APISet) StripPlural() APISet
- func (s APISet) Union(sets ...APISet) APISet
- type BundleInstallable
- func (i *BundleInstallable) AddConflict(id solver.Identifier)
- func (i *BundleInstallable) AddDependency(dependencies []solver.Identifier)
- func (i *BundleInstallable) BundleSourceInfo() (string, string, registry.CatalogKey, error)
- func (i BundleInstallable) Constraints() []solver.Constraint
- func (i BundleInstallable) Identifier() solver.Identifier
- func (i *BundleInstallable) MakeProhibited()
- type CatalogSnapshot
- type DefaultRegistryClientProvider
- type EmptyOperatorFinder
- type GenericInstallable
- type InstrumentedResolver
- type MultiCatalogOperatorFinder
- type NamespaceSet
- type NamespaceSourceQuerier
- func (q *NamespaceSourceQuerier) FindBundle(pkgName, channelName, bundleName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error)
- func (q *NamespaceSourceQuerier) FindLatestBundle(pkgName, channelName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error)
- func (q *NamespaceSourceQuerier) FindProvider(api opregistry.APIKey, initialSource registry.CatalogKey, ...) (*registryapi.Bundle, *registry.CatalogKey, error)
- func (q *NamespaceSourceQuerier) FindReplacement(currentVersion *semver.Version, bundleName, pkgName, channelName string, ...) (*api.Bundle, *registry.CatalogKey, error)
- func (q *NamespaceSourceQuerier) Queryable() error
- type NamespacedOperatorCache
- func (c *NamespacedOperatorCache) Catalog(k registry.CatalogKey) OperatorFinder
- func (c *NamespacedOperatorCache) Find(p ...OperatorPredicate) []*Operator
- func (c *NamespacedOperatorCache) FindPreferred(preferred *registry.CatalogKey, p ...OperatorPredicate) []*Operator
- func (c *NamespacedOperatorCache) WithExistingOperators(snapshot *CatalogSnapshot) MultiCatalogOperatorFinder
- type Operator
- func AtLeast(n int, operators []*Operator) ([]*Operator, error)
- func ExactlyOne(operators []*Operator) (*Operator, error)
- func Filter(operators []*Operator, p ...OperatorPredicate) []*Operator
- func NewOperatorFromBundle(bundle *api.Bundle, startingCSV string, sourceKey registry.CatalogKey, ...) (*Operator, error)
- func NewOperatorFromV1Alpha1CSV(csv *v1alpha1.ClusterServiceVersion) (*Operator, error)
- func (o *Operator) Bundle() *api.Bundle
- func (o *Operator) Channel() string
- func (o *Operator) Dependencies() []*api.Dependency
- func (o *Operator) DependencyPredicates() (predicates []OperatorPredicate, err error)
- func (o *Operator) Identifier() string
- func (o *Operator) Inline() bool
- func (o *Operator) Package() string
- func (o *Operator) Properties() []*api.Property
- func (o *Operator) ProvidedAPIs() APISet
- func (o *Operator) Replaces() string
- func (o *Operator) RequiredAPIs() APISet
- func (o *Operator) SetReplaces(replacing string)
- func (o *Operator) Skips() []string
- func (o *Operator) SourceInfo() *OperatorSourceInfo
- func (o *Operator) Version() *semver.Version
- type OperatorCache
- type OperatorCacheProvider
- type OperatorFinder
- type OperatorGroup
- type OperatorGroupSurface
- type OperatorPermissions
- func (o *OperatorPermissions) AddClusterRole(clusterRole *rbacv1.ClusterRole)
- func (o *OperatorPermissions) AddClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding)
- func (o *OperatorPermissions) AddRole(role *rbacv1.Role)
- func (o *OperatorPermissions) AddRoleBinding(roleBinding *rbacv1.RoleBinding)
- type OperatorPredicate
- func And(p ...OperatorPredicate) OperatorPredicate
- func CountingPredicate(p OperatorPredicate, n *int) OperatorPredicate
- func False() OperatorPredicate
- func Or(p ...OperatorPredicate) OperatorPredicate
- func PredicateForDependency(dependency *api.Dependency) (OperatorPredicate, error)
- func ProvidingAPI(api opregistry.APIKey) OperatorPredicate
- func Replaces(name string) OperatorPredicate
- func SkipRangeIncludes(version semver.Version) OperatorPredicate
- func True() OperatorPredicate
- func WithCSVName(name string) OperatorPredicate
- func WithCatalog(key registry.CatalogKey) OperatorPredicate
- func WithChannel(channel string) OperatorPredicate
- func WithLabel(label string) OperatorPredicate
- func WithPackage(pkg string) OperatorPredicate
- func WithVersionInRange(r semver.Range) OperatorPredicate
- type OperatorPredicateFunc
- type OperatorResolver
- type OperatorSet
- type OperatorSourceInfo
- type OperatorStepResolver
- type OperatorSurface
- type RegistryClientProvider
- type SatResolver
- type SortableSnapshots
- type SourceQuerier
- type SourceRef
- type StepResolver
Constants ¶
const (
// APILabelKeyPrefix is the key prefix for a CSV's APIs label
APILabelKeyPrefix = "olm.api."
)
const (
BundleLookupConditionPacked v1alpha1.BundleLookupConditionType = "BundleLookupNotPersisted"
)
const (
BundleSecretKind = "BundleSecret"
)
const SkipPackageAnnotationKey = "olm.skipRange"
Variables ¶
var ExistingOperator = OperatorSourceInfo{Package: "", Channel: "", StartingCSV: "", Catalog: NoCatalog, DefaultChannel: false}
var NoCatalog = registry.CatalogKey{Name: "", Namespace: ""}
Functions ¶
func APIKeyToGVKHash ¶
func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
func APIKeyToGVKString ¶
func APIKeyToGVKString(key opregistry.APIKey) string
func LabelSetsFor ¶
LabelSetsFor returns API label sets for the given object. Concrete types other than OperatorSurface and CustomResource definition no-op.
func Matches ¶
func Matches(o *Operator, p ...OperatorPredicate) bool
func NewInvalidSubscriptionInstallable ¶ added in v0.18.0
func NewInvalidSubscriptionInstallable(name string, reason string) solver.Installable
func NewServiceAccountStepResources ¶
func NewServiceAccountStepResources(csv *v1alpha1.ClusterServiceVersion, catalogSourceName, catalogSourceNamespace string) ([]v1alpha1.StepResource, error)
NewServiceAccountStepResources returns a list of step resources required to satisfy the RBAC requirements of the given CSV's InstallStrategy
func NewSingleAPIProviderInstallable ¶ added in v0.18.0
func NewSingleAPIProviderInstallable(group, version, kind string, providers []solver.Identifier) solver.Installable
func NewSinglePackageInstanceInstallable ¶ added in v0.18.0
func NewSinglePackageInstanceInstallable(pkg string, providers []solver.Identifier) solver.Installable
func NewStepResourceFromObject ¶
func NewStepResourceFromObject(obj runtime.Object, catalogSourceName, catalogSourceNamespace string) (v1alpha1.StepResource, error)
NewStepResourceForObject returns a new StepResource for the provided object
func NewStepsFromBundle ¶
func NewSubscriptionInstallable ¶
func NewSubscriptionInstallable(name string, dependencies []solver.Identifier) solver.Installable
func NewSubscriptionStepResource ¶
func NewSubscriptionStepResource(namespace string, info OperatorSourceInfo) (v1alpha1.StepResource, error)
func PrettyConstraint ¶ added in v0.18.0
func PrettyConstraint(c solver.Constraint, msg string) solver.Constraint
func RBACForClusterServiceVersion ¶
func RBACForClusterServiceVersion(csv *v1alpha1.ClusterServiceVersion) (map[string]*OperatorPermissions, error)
func V1alpha1CSVFromBundle ¶
func V1alpha1CSVFromBundle(bundle *api.Bundle) (*v1alpha1.ClusterServiceVersion, error)
Types ¶
type APIIntersectionReconcileFunc ¶
type APIIntersectionReconcileFunc func(add APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult
func (APIIntersectionReconcileFunc) Reconcile ¶
func (a APIIntersectionReconcileFunc) Reconcile(add APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult
type APIIntersectionReconciler ¶
type APIIntersectionReconciler interface {
Reconcile(add APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult
}
type APIMultiOwnerSet ¶
type APIMultiOwnerSet map[opregistry.APIKey]OperatorSet
func EmptyAPIMultiOwnerSet ¶
func EmptyAPIMultiOwnerSet() APIMultiOwnerSet
func (APIMultiOwnerSet) PopAPIKey ¶
func (s APIMultiOwnerSet) PopAPIKey() *opregistry.APIKey
func (APIMultiOwnerSet) PopAPIRequirers ¶
func (s APIMultiOwnerSet) PopAPIRequirers() OperatorSet
type APIOwnerSet ¶
type APIOwnerSet map[opregistry.APIKey]OperatorSurface
func EmptyAPIOwnerSet ¶
func EmptyAPIOwnerSet() APIOwnerSet
type APIReconciliationResult ¶
type APIReconciliationResult int
const ( RemoveAPIs APIReconciliationResult = iota AddAPIs APIConflict NoAPIConflict )
func ReconcileAPIIntersection ¶
func ReconcileAPIIntersection(add APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult
type APISet ¶
type APISet map[opregistry.APIKey]struct{}
func EmptyAPISet ¶
func EmptyAPISet() APISet
func (APISet) Difference ¶
func (APISet) Intersection ¶
Intersection returns the intersection of the APISet and the given list of APISets
func (APISet) PopAPIKey ¶
func (s APISet) PopAPIKey() *opregistry.APIKey
func (APISet) StripPlural ¶
StripPlural returns the APISet with the Plural field of all APIKeys removed
type BundleInstallable ¶
type BundleInstallable struct { Replaces string // contains filtered or unexported fields }
func NewBundleInstallable ¶
func NewBundleInstallable(bundle, channel string, catalog registry.CatalogKey, constraints ...solver.Constraint) BundleInstallable
func NewBundleInstallableFromOperator ¶ added in v0.18.2
func NewBundleInstallableFromOperator(o *Operator) (BundleInstallable, error)
func (*BundleInstallable) AddConflict ¶
func (i *BundleInstallable) AddConflict(id solver.Identifier)
func (*BundleInstallable) AddDependency ¶
func (i *BundleInstallable) AddDependency(dependencies []solver.Identifier)
func (*BundleInstallable) BundleSourceInfo ¶
func (i *BundleInstallable) BundleSourceInfo() (string, string, registry.CatalogKey, error)
func (BundleInstallable) Constraints ¶
func (i BundleInstallable) Constraints() []solver.Constraint
func (BundleInstallable) Identifier ¶
func (i BundleInstallable) Identifier() solver.Identifier
func (*BundleInstallable) MakeProhibited ¶
func (i *BundleInstallable) MakeProhibited()
type CatalogSnapshot ¶
type CatalogSnapshot struct {
// contains filtered or unexported fields
}
func NewRunningOperatorSnapshot ¶
func NewRunningOperatorSnapshot(logger logrus.FieldLogger, key registry.CatalogKey, o []*Operator) *CatalogSnapshot
NewRunningOperatorSnapshot creates a CatalogSnapshot that represents a set of existing installed operators in the cluster.
func (*CatalogSnapshot) Cancel ¶
func (s *CatalogSnapshot) Cancel()
func (*CatalogSnapshot) Find ¶
func (s *CatalogSnapshot) Find(p ...OperatorPredicate) []*Operator
type DefaultRegistryClientProvider ¶
type DefaultRegistryClientProvider struct {
// contains filtered or unexported fields
}
func NewDefaultRegistryClientProvider ¶
func NewDefaultRegistryClientProvider(log logrus.FieldLogger, store RegistryClientProvider) *DefaultRegistryClientProvider
func (*DefaultRegistryClientProvider) ClientsForNamespaces ¶
func (rcp *DefaultRegistryClientProvider) ClientsForNamespaces(namespaces ...string) map[registry.CatalogKey]client.Interface
type EmptyOperatorFinder ¶
type EmptyOperatorFinder struct{}
func (EmptyOperatorFinder) Find ¶
func (f EmptyOperatorFinder) Find(...OperatorPredicate) []*Operator
type GenericInstallable ¶ added in v0.18.0
type GenericInstallable struct {
// contains filtered or unexported fields
}
func (GenericInstallable) Constraints ¶ added in v0.18.0
func (i GenericInstallable) Constraints() []solver.Constraint
func (GenericInstallable) Identifier ¶ added in v0.18.0
func (i GenericInstallable) Identifier() solver.Identifier
type InstrumentedResolver ¶
type InstrumentedResolver struct {
// contains filtered or unexported fields
}
func NewInstrumentedResolver ¶
func NewInstrumentedResolver(resolver StepResolver, successMetricsEmitter, failureMetricsEmitter func(time.Duration)) *InstrumentedResolver
func (*InstrumentedResolver) Expire ¶
func (ir *InstrumentedResolver) Expire(key registry.CatalogKey)
func (*InstrumentedResolver) ResolveSteps ¶
func (ir *InstrumentedResolver) ResolveSteps(namespace string, sourceQuerier SourceQuerier) ([]*v1alpha1.Step, []v1alpha1.BundleLookup, []*v1alpha1.Subscription, error)
type MultiCatalogOperatorFinder ¶
type MultiCatalogOperatorFinder interface { Catalog(registry.CatalogKey) OperatorFinder FindPreferred(*registry.CatalogKey, ...OperatorPredicate) []*Operator WithExistingOperators(*CatalogSnapshot) MultiCatalogOperatorFinder OperatorFinder }
type NamespaceSet ¶
type NamespaceSet map[string]struct{}
func NewNamespaceSet ¶
func NewNamespaceSet(namespaces []string) NamespaceSet
func NewNamespaceSetFromString ¶
func NewNamespaceSetFromString(namespaces string) NamespaceSet
NewNamespaceSetFromString creates a namespace set from a comma-delimited list of namespaces
func (NamespaceSet) Contains ¶
func (n NamespaceSet) Contains(namespace string) bool
func (NamespaceSet) Intersection ¶
func (n NamespaceSet) Intersection(set NamespaceSet) NamespaceSet
func (NamespaceSet) IsAllNamespaces ¶
func (n NamespaceSet) IsAllNamespaces() bool
func (NamespaceSet) Peek ¶
func (n NamespaceSet) Peek() string
func (NamespaceSet) Union ¶
func (n NamespaceSet) Union(set NamespaceSet) NamespaceSet
type NamespaceSourceQuerier ¶
type NamespaceSourceQuerier struct {
// contains filtered or unexported fields
}
func NewNamespaceSourceQuerier ¶
func NewNamespaceSourceQuerier(sources map[registry.CatalogKey]registry.ClientInterface) *NamespaceSourceQuerier
func (*NamespaceSourceQuerier) FindBundle ¶
func (q *NamespaceSourceQuerier) FindBundle(pkgName, channelName, bundleName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error)
func (*NamespaceSourceQuerier) FindLatestBundle ¶
func (q *NamespaceSourceQuerier) FindLatestBundle(pkgName, channelName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error)
func (*NamespaceSourceQuerier) FindProvider ¶
func (q *NamespaceSourceQuerier) FindProvider(api opregistry.APIKey, initialSource registry.CatalogKey, excludedPackages map[string]struct{}) (*registryapi.Bundle, *registry.CatalogKey, error)
func (*NamespaceSourceQuerier) FindReplacement ¶
func (q *NamespaceSourceQuerier) FindReplacement(currentVersion *semver.Version, bundleName, pkgName, channelName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error)
func (*NamespaceSourceQuerier) Queryable ¶
func (q *NamespaceSourceQuerier) Queryable() error
type NamespacedOperatorCache ¶
type NamespacedOperatorCache struct {
// contains filtered or unexported fields
}
func (*NamespacedOperatorCache) Catalog ¶
func (c *NamespacedOperatorCache) Catalog(k registry.CatalogKey) OperatorFinder
func (*NamespacedOperatorCache) Find ¶
func (c *NamespacedOperatorCache) Find(p ...OperatorPredicate) []*Operator
func (*NamespacedOperatorCache) FindPreferred ¶
func (c *NamespacedOperatorCache) FindPreferred(preferred *registry.CatalogKey, p ...OperatorPredicate) []*Operator
func (*NamespacedOperatorCache) WithExistingOperators ¶
func (c *NamespacedOperatorCache) WithExistingOperators(snapshot *CatalogSnapshot) MultiCatalogOperatorFinder
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
func ExactlyOne ¶
func Filter ¶
func Filter(operators []*Operator, p ...OperatorPredicate) []*Operator
func NewOperatorFromBundle ¶
func NewOperatorFromV1Alpha1CSV ¶
func NewOperatorFromV1Alpha1CSV(csv *v1alpha1.ClusterServiceVersion) (*Operator, error)
func (*Operator) Dependencies ¶
func (o *Operator) Dependencies() []*api.Dependency
func (*Operator) DependencyPredicates ¶
func (o *Operator) DependencyPredicates() (predicates []OperatorPredicate, err error)
func (*Operator) Identifier ¶
func (*Operator) Properties ¶
func (*Operator) ProvidedAPIs ¶
func (*Operator) RequiredAPIs ¶
func (*Operator) SetReplaces ¶
func (*Operator) SourceInfo ¶
func (o *Operator) SourceInfo() *OperatorSourceInfo
type OperatorCache ¶
type OperatorCache struct {
// contains filtered or unexported fields
}
func NewOperatorCache ¶
func NewOperatorCache(rcp RegistryClientProvider, log logrus.FieldLogger, catsrcLister v1alpha1.CatalogSourceLister) *OperatorCache
func (*OperatorCache) Expire ¶
func (c *OperatorCache) Expire(catalog registry.CatalogKey)
func (*OperatorCache) Namespaced ¶
func (c *OperatorCache) Namespaced(namespaces ...string) MultiCatalogOperatorFinder
type OperatorCacheProvider ¶
type OperatorCacheProvider interface { Namespaced(namespaces ...string) MultiCatalogOperatorFinder Expire(catalog registry.CatalogKey) }
type OperatorFinder ¶
type OperatorFinder interface {
Find(...OperatorPredicate) []*Operator
}
type OperatorGroup ¶
type OperatorGroup struct {
// contains filtered or unexported fields
}
func NewOperatorGroup ¶
func NewOperatorGroup(group *v1.OperatorGroup) *OperatorGroup
func (*OperatorGroup) GroupIntersection ¶
func (g *OperatorGroup) GroupIntersection(groups ...OperatorGroupSurface) []OperatorGroupSurface
func (*OperatorGroup) Identifier ¶
func (g *OperatorGroup) Identifier() string
func (*OperatorGroup) Namespace ¶
func (g *OperatorGroup) Namespace() string
func (*OperatorGroup) ProvidedAPIs ¶
func (g *OperatorGroup) ProvidedAPIs() APISet
func (*OperatorGroup) Targets ¶
func (g *OperatorGroup) Targets() NamespaceSet
type OperatorGroupSurface ¶
type OperatorGroupSurface interface { Identifier() string Namespace() string Targets() NamespaceSet ProvidedAPIs() APISet GroupIntersection(groups ...OperatorGroupSurface) []OperatorGroupSurface }
func NewOperatorGroupSurfaces ¶
func NewOperatorGroupSurfaces(groups ...v1.OperatorGroup) []OperatorGroupSurface
type OperatorPermissions ¶
type OperatorPermissions struct { ServiceAccount *corev1.ServiceAccount Roles []*rbacv1.Role RoleBindings []*rbacv1.RoleBinding ClusterRoles []*rbacv1.ClusterRole ClusterRoleBindings []*rbacv1.ClusterRoleBinding }
func NewOperatorPermissions ¶
func NewOperatorPermissions(serviceAccount *corev1.ServiceAccount) *OperatorPermissions
func (*OperatorPermissions) AddClusterRole ¶
func (o *OperatorPermissions) AddClusterRole(clusterRole *rbacv1.ClusterRole)
func (*OperatorPermissions) AddClusterRoleBinding ¶
func (o *OperatorPermissions) AddClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding)
func (*OperatorPermissions) AddRole ¶
func (o *OperatorPermissions) AddRole(role *rbacv1.Role)
func (*OperatorPermissions) AddRoleBinding ¶
func (o *OperatorPermissions) AddRoleBinding(roleBinding *rbacv1.RoleBinding)
type OperatorPredicate ¶
func And ¶
func And(p ...OperatorPredicate) OperatorPredicate
func CountingPredicate ¶ added in v0.18.0
func CountingPredicate(p OperatorPredicate, n *int) OperatorPredicate
func False ¶ added in v0.18.0
func False() OperatorPredicate
func Or ¶
func Or(p ...OperatorPredicate) OperatorPredicate
func PredicateForDependency ¶
func PredicateForDependency(dependency *api.Dependency) (OperatorPredicate, error)
TODO: this should go in its own dependency/predicate builder package TODO: can we make this more extensible, i.e. via cue
func ProvidingAPI ¶
func ProvidingAPI(api opregistry.APIKey) OperatorPredicate
func Replaces ¶
func Replaces(name string) OperatorPredicate
func SkipRangeIncludes ¶
func SkipRangeIncludes(version semver.Version) OperatorPredicate
func True ¶ added in v0.18.0
func True() OperatorPredicate
func WithCSVName ¶
func WithCSVName(name string) OperatorPredicate
func WithCatalog ¶ added in v0.18.0
func WithCatalog(key registry.CatalogKey) OperatorPredicate
func WithChannel ¶
func WithChannel(channel string) OperatorPredicate
func WithLabel ¶
func WithLabel(label string) OperatorPredicate
func WithPackage ¶
func WithPackage(pkg string) OperatorPredicate
func WithVersionInRange ¶
func WithVersionInRange(r semver.Range) OperatorPredicate
type OperatorPredicateFunc ¶ added in v0.18.0
func (OperatorPredicateFunc) Test ¶ added in v0.18.0
func (opf OperatorPredicateFunc) Test(o *Operator) bool
type OperatorResolver ¶
type OperatorResolver interface {
SolveOperators(csvs []*v1alpha1.ClusterServiceVersion, subs []*v1alpha1.Subscription, add map[OperatorSourceInfo]struct{}) (OperatorSet, error)
}
type OperatorSet ¶
type OperatorSet map[string]OperatorSurface
func EmptyOperatorSet ¶
func EmptyOperatorSet() OperatorSet
func (OperatorSet) Snapshot ¶
func (o OperatorSet) Snapshot() OperatorSet
Snapshot returns a new set, pointing to the same values
type OperatorSourceInfo ¶
type OperatorSourceInfo struct { Package string Channel string StartingCSV string Catalog registry.CatalogKey DefaultChannel bool }
func (*OperatorSourceInfo) String ¶
func (i *OperatorSourceInfo) String() string
type OperatorStepResolver ¶
type OperatorStepResolver struct {
// contains filtered or unexported fields
}
func NewOperatorStepResolver ¶
func NewOperatorStepResolver(lister operatorlister.OperatorLister, client versioned.Interface, kubeclient kubernetes.Interface, globalCatalogNamespace string, provider RegistryClientProvider, log logrus.FieldLogger) *OperatorStepResolver
func (*OperatorStepResolver) Expire ¶
func (r *OperatorStepResolver) Expire(key registry.CatalogKey)
func (*OperatorStepResolver) ResolveSteps ¶
func (r *OperatorStepResolver) ResolveSteps(namespace string, _ SourceQuerier) ([]*v1alpha1.Step, []v1alpha1.BundleLookup, []*v1alpha1.Subscription, error)
type OperatorSurface ¶
type OperatorSurface interface { ProvidedAPIs() APISet RequiredAPIs() APISet Identifier() string Replaces() string Version() *semver.Version SourceInfo() *OperatorSourceInfo Bundle() *api.Bundle Inline() bool Dependencies() []*api.Dependency Properties() []*api.Property Skips() []string }
OperatorSurface describes the API surfaces provided and required by an Operator.
type RegistryClientProvider ¶
type RegistryClientProvider interface {
ClientsForNamespaces(namespaces ...string) map[registry.CatalogKey]client.Interface
}
type SatResolver ¶
type SatResolver struct {
// contains filtered or unexported fields
}
func NewDefaultSatResolver ¶
func NewDefaultSatResolver(rcp RegistryClientProvider, catsrcLister v1alpha1listers.CatalogSourceLister, log logrus.FieldLogger) *SatResolver
func (*SatResolver) SolveOperators ¶
func (r *SatResolver) SolveOperators(namespaces []string, csvs []*v1alpha1.ClusterServiceVersion, subs []*v1alpha1.Subscription) (OperatorSet, error)
type SortableSnapshots ¶
type SortableSnapshots struct {
// contains filtered or unexported fields
}
func NewSortableSnapshots ¶
func NewSortableSnapshots(existing, preferred *registry.CatalogKey, namespaces []string, snapshots map[registry.CatalogKey]*CatalogSnapshot) SortableSnapshots
func (SortableSnapshots) Len ¶
func (s SortableSnapshots) Len() int
Len is the number of elements in the collection.
func (SortableSnapshots) Less ¶
func (s SortableSnapshots) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j.
func (SortableSnapshots) Swap ¶
func (s SortableSnapshots) Swap(i, j int)
Swap swaps the elements with indexes i and j.
type SourceQuerier ¶
type SourceQuerier interface { FindProvider(api opregistry.APIKey, initialSource registry.CatalogKey, excludedPackages map[string]struct{}) (*api.Bundle, *registry.CatalogKey, error) FindBundle(pkgName, channelName, bundleName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error) FindLatestBundle(pkgName, channelName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error) FindReplacement(currentVersion *semver.Version, bundleName, pkgName, channelName string, initialSource registry.CatalogKey) (*api.Bundle, *registry.CatalogKey, error) Queryable() error }
type StepResolver ¶
type StepResolver interface { ResolveSteps(namespace string, sourceQuerier SourceQuerier) ([]*v1alpha1.Step, []v1alpha1.BundleLookup, []*v1alpha1.Subscription, error) Expire(key registry.CatalogKey) }