openshift

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IncompatibleOperatorsInstalled     = "IncompatibleOperatorsInstalled"
	ErrorCheckingOperatorCompatibility = "ErrorCheckingOperatorCompatibility"
)
View Source
const (
	MaxOpenShiftVersionProperty = "olm.maxOpenShiftVersion"
)

Variables

View Source
var (

	// AddToScheme adds all types necessary for the controller to operate.
	AddToScheme = localSchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ClusterOperator

type ClusterOperator struct {
	*configv1.ClusterOperator
}

func NewClusterOperator

func NewClusterOperator(name string) *ClusterOperator

func (*ClusterOperator) GetCondition

func (*ClusterOperator) GetOperatorVersion

func (c *ClusterOperator) GetOperatorVersion() string

func (*ClusterOperator) SetCondition

func (c *ClusterOperator) SetCondition(condition *configv1.ClusterOperatorStatusCondition)

type ClusterOperatorReconciler

type ClusterOperatorReconciler struct {
	*ReconcilerConfig
	// contains filtered or unexported fields
}

func NewClusterOperatorReconciler

func NewClusterOperatorReconciler(opts ...ReconcilerOption) (*ClusterOperatorReconciler, error)

func (*ClusterOperatorReconciler) Reconcile

func (*ClusterOperatorReconciler) SetupWithManager

func (r *ClusterOperatorReconciler) SetupWithManager(mgr ctrl.Manager) error

type MutateFunc

type MutateFunc func(context.Context, *ClusterOperator) error

func (MutateFunc) Mutate

func (m MutateFunc) Mutate(ctx context.Context, co *ClusterOperator) error

type Mutator

type Mutator interface {
	Mutate(context.Context, *ClusterOperator) error
}

type NowFunc

type NowFunc func() metav1.Time

type ReconcilerConfig

type ReconcilerConfig struct {
	Client       client.Client
	Scheme       *runtime.Scheme
	Log          logr.Logger
	RequeueDelay time.Duration
	TweakBuilder func(*builder.Builder) *builder.Builder
	Now          NowFunc

	Name           string
	Namespace      string
	SyncCh         <-chan error
	TargetVersions []configv1.OperandVersion

	Mutator Mutator
}

type ReconcilerOption

type ReconcilerOption func(*ReconcilerConfig)

func WithClient

func WithClient(cli client.Client) ReconcilerOption

func WithLog

func WithLog(log logr.Logger) ReconcilerOption

func WithName

func WithName(name string) ReconcilerOption

func WithNamespace

func WithNamespace(namespace string) ReconcilerOption

func WithNow

func WithNow(now NowFunc) ReconcilerOption

func WithOLMOperator

func WithOLMOperator() ReconcilerOption

func WithScheme

func WithScheme(scheme *runtime.Scheme) ReconcilerOption

func WithSyncChannel

func WithSyncChannel(syncCh <-chan error) ReconcilerOption

func WithTargetVersions

func WithTargetVersions(targetVersions ...configv1.OperandVersion) ReconcilerOption

type SerialMutations

type SerialMutations []Mutator

func (SerialMutations) Mutate

type SyncTracker

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

func NewSyncTracker

func NewSyncTracker(syncCh <-chan error, co *configv1.ClusterOperator) *SyncTracker

func (*SyncTracker) Events

func (s *SyncTracker) Events() <-chan event.GenericEvent

func (*SyncTracker) Start

func (s *SyncTracker) Start(ctx context.Context) error

func (*SyncTracker) SuccessfulSyncs

func (s *SyncTracker) SuccessfulSyncs() int

func (*SyncTracker) TotalSyncs

func (s *SyncTracker) TotalSyncs() int

Jump to

Keyboard shortcuts

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