olm

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 74 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AdminSuffix = "admin"
	EditSuffix  = "edit"
	ViewSuffix  = "view"
)
View Source
const (
	// APILabelKeyPrefix is the key prefix for a CSV's APIs label
	APILabelKeyPrefix = "olm.api."
)
View Source
const (
	// Name of packageserver API service
	PackageserverName = "v1.packages.operators.coreos.com"
)

Variables

View Source
var (
	ErrRequirementsNotMet      = errors.New("requirements were not met")
	ErrCRDOwnerConflict        = errors.New("conflicting CRD owner in namespace")
	ErrAPIServiceOwnerConflict = errors.New("unable to adopt APIService")
)
View Source
var (
	AdminVerbs     = []string{"*"}
	EditVerbs      = []string{"create", "update", "patch", "delete"}
	ViewVerbs      = []string{"get", "list", "watch"}
	Suffices       = []string{AdminSuffix, EditSuffix, ViewSuffix}
	VerbsForSuffix = map[string][]string{
		AdminSuffix: AdminVerbs,
		EditSuffix:  EditVerbs,
		ViewSuffix:  ViewVerbs,
	}
)

Functions

func LabelSetsFor added in v0.19.0

func LabelSetsFor(obj interface{}) ([]labels.Set, error)

LabelSetsFor returns API label sets for the given object. Concrete types other than OperatorSurface and CustomResource definition no-op.

Types

type APIIntersectionReconcileFunc added in v0.19.0

type APIIntersectionReconcileFunc func(add cache.APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult

func (APIIntersectionReconcileFunc) Reconcile added in v0.19.0

type APIIntersectionReconciler added in v0.19.0

type APIIntersectionReconciler interface {
	Reconcile(add cache.APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult
}

type APIReconciliationResult added in v0.19.0

type APIReconciliationResult int
const (
	RemoveAPIs APIReconciliationResult = iota
	AddAPIs
	APIConflict
	NoAPIConflict
)

func ReconcileAPIIntersection added in v0.19.0

func ReconcileAPIIntersection(add cache.APISet, group OperatorGroupSurface, otherGroups ...OperatorGroupSurface) APIReconciliationResult

type NamespaceSet added in v0.19.0

type NamespaceSet map[string]struct{}

func NewNamespaceSet added in v0.19.0

func NewNamespaceSet(namespaces []string) NamespaceSet

func NewNamespaceSetFromString added in v0.19.0

func NewNamespaceSetFromString(namespaces string) NamespaceSet

NewNamespaceSetFromString creates a namespace set from a comma-delimited list of namespaces

func (NamespaceSet) Contains added in v0.19.0

func (n NamespaceSet) Contains(namespace string) bool

func (NamespaceSet) Intersection added in v0.19.0

func (n NamespaceSet) Intersection(set NamespaceSet) NamespaceSet

func (NamespaceSet) IsAllNamespaces added in v0.19.0

func (n NamespaceSet) IsAllNamespaces() bool

func (NamespaceSet) Peek added in v0.19.0

func (n NamespaceSet) Peek() string

func (NamespaceSet) Union added in v0.19.0

func (n NamespaceSet) Union(set NamespaceSet) NamespaceSet

type Operator

type Operator struct {
	queueinformer.Operator
	// contains filtered or unexported fields
}

func NewOperator

func NewOperator(ctx context.Context, options ...OperatorOption) (*Operator, error)

func (*Operator) EnsureCSVMetric added in v0.19.0

func (a *Operator) EnsureCSVMetric() error

func (*Operator) GetCSVSetGenerator

func (a *Operator) GetCSVSetGenerator() csvutility.SetGenerator

func (*Operator) GetReplaceFinder

func (a *Operator) GetReplaceFinder() csvutility.ReplaceFinder

func (*Operator) Informers added in v0.26.0

func (a *Operator) Informers() map[string]*plugins.Informers

func (*Operator) RegisterCSVWatchNotification

func (a *Operator) RegisterCSVWatchNotification(csvNotification csvutility.WatchNotification)

type OperatorGroup added in v0.19.0

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

func NewOperatorGroup added in v0.19.0

func NewOperatorGroup(group *operatorsv1.OperatorGroup) *OperatorGroup

func (*OperatorGroup) GroupIntersection added in v0.19.0

func (g *OperatorGroup) GroupIntersection(groups ...OperatorGroupSurface) []OperatorGroupSurface

func (*OperatorGroup) Identifier added in v0.19.0

func (g *OperatorGroup) Identifier() string

func (*OperatorGroup) Namespace added in v0.19.0

func (g *OperatorGroup) Namespace() string

func (*OperatorGroup) ProvidedAPIs added in v0.19.0

func (g *OperatorGroup) ProvidedAPIs() cache.APISet

func (*OperatorGroup) Targets added in v0.19.0

func (g *OperatorGroup) Targets() NamespaceSet

type OperatorGroupSurface added in v0.19.0

type OperatorGroupSurface interface {
	Identifier() string
	Namespace() string
	Targets() NamespaceSet
	ProvidedAPIs() cache.APISet
	GroupIntersection(groups ...OperatorGroupSurface) []OperatorGroupSurface
}

func NewOperatorGroupSurfaces added in v0.19.0

func NewOperatorGroupSurfaces(groups ...operatorsv1.OperatorGroup) []OperatorGroupSurface

type OperatorOption

type OperatorOption func(*operatorConfig)

func WithAPILabeler

func WithAPILabeler(apiLabeler labeler.Labeler) OperatorOption

func WithAPIReconciler

func WithAPIReconciler(apiReconciler APIIntersectionReconciler) OperatorOption

func WithClock

func WithClock(clock utilclock.Clock) OperatorOption

func WithConfigClient

func WithConfigClient(configClient configv1client.Interface) OperatorOption

func WithExternalClient

func WithExternalClient(externalClient versioned.Interface) OperatorOption

func WithLogger

func WithLogger(logger *logrus.Logger) OperatorOption

func WithMetadataClient added in v0.26.0

func WithMetadataClient(metadataClient metadata.Interface) OperatorOption

func WithOperatorClient

func WithOperatorClient(operatorClient operatorclient.ClientInterface) OperatorOption

func WithOperatorNamespace

func WithOperatorNamespace(namespace string) OperatorOption

func WithProtectedCopiedCSVNamespaces added in v0.22.0

func WithProtectedCopiedCSVNamespaces(namespaces string) OperatorOption

func WithRestConfig

func WithRestConfig(restConfig *rest.Config) OperatorOption

func WithResyncPeriod

func WithResyncPeriod(resyncPeriod func() time.Duration) OperatorOption

func WithStrategyResolver

func WithStrategyResolver(strategyResolver install.StrategyResolverInterface) OperatorOption

func WithWatchedNamespaces

func WithWatchedNamespaces(namespaces ...string) OperatorOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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