operator

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAtlasDomain           = "https://cloud.mongodb.com/"
	DefaultSyncPeriod            = 3 * time.Hour
	DefaultIndependentSyncPeriod = 15 * time.Minute
	DefaultLeaderElectionID      = "06d035fb.mongodb.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(provider ManagerProvider, scheme *runtime.Scheme, minimumIndependentSyncPeriod time.Duration) *Builder

NewBuilder return a new Builder to construct operator controllers

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (manager.Manager, error)

Build builds the controller manager and configure operator controllers

func (*Builder) WithAPISecret

func (b *Builder) WithAPISecret(apiSecret client.ObjectKey) *Builder

func (*Builder) WithAtlasDomain

func (b *Builder) WithAtlasDomain(domain string) *Builder

func (*Builder) WithAtlasProvider

func (b *Builder) WithAtlasProvider(provider atlas.Provider) *Builder

func (*Builder) WithConfig

func (b *Builder) WithConfig(config *rest.Config) *Builder

func (*Builder) WithDeletionProtection

func (b *Builder) WithDeletionProtection(deletionProtection bool) *Builder

func (*Builder) WithFeatureFlags

func (b *Builder) WithFeatureFlags(featureFlags *featureflags.FeatureFlags) *Builder

func (*Builder) WithIndependentSyncPeriod added in v2.5.0

func (b *Builder) WithIndependentSyncPeriod(period time.Duration) *Builder

func (*Builder) WithLeaderElection

func (b *Builder) WithLeaderElection(enable bool) *Builder

func (*Builder) WithLogger

func (b *Builder) WithLogger(logger *zap.Logger) *Builder

func (*Builder) WithMetricAddress

func (b *Builder) WithMetricAddress(address string) *Builder

func (*Builder) WithNamespaces

func (b *Builder) WithNamespaces(namespaces ...string) *Builder

func (*Builder) WithPredicates

func (b *Builder) WithPredicates(predicates []predicate.Predicate) *Builder

func (*Builder) WithProbeAddress

func (b *Builder) WithProbeAddress(address string) *Builder

func (*Builder) WithSkipNameValidation added in v2.5.0

func (b *Builder) WithSkipNameValidation(skip bool) *Builder

WithSkipNameValidation skips name validation in controller-runtime to prevent duplicate controller names.

Note: use this in tests only, setting this to true in a production setup will cause faulty behavior.

func (*Builder) WithSyncPeriod

func (b *Builder) WithSyncPeriod(period time.Duration) *Builder

type ManagerProvider

type ManagerProvider interface {
	New(config *rest.Config, options manager.Options) (manager.Manager, error)
}

type ManagerProviderFunc

type ManagerProviderFunc func(config *rest.Config, options manager.Options) (manager.Manager, error)

func (ManagerProviderFunc) New

func (f ManagerProviderFunc) New(config *rest.Config, options manager.Options) (manager.Manager, error)

Jump to

Keyboard shortcuts

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