initializer

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDWaiter

type CRDWaiter struct {
	Names   []string
	Timeout time.Duration
	Period  time.Duration
	// contains filtered or unexported fields
}

CRDWaiter blocks the execution until all the CRDs whose names are given are deployed to the cluster.

func NewCRDWaiter

func NewCRDWaiter(names []string, timeout time.Duration, period time.Duration, log logging.Logger) *CRDWaiter

NewCRDWaiter returns a new *CRDWaiter initializer.

func (*CRDWaiter) Run

func (cw *CRDWaiter) Run(ctx context.Context, kube client.Client) error

Run continuously checks whether the list of CRDs whose names are given are present in the cluster.

type CoreCRDs

type CoreCRDs struct {
	Path   string
	Scheme *runtime.Scheme
}

CoreCRDs makes sure the CRDs are installed.

func NewCoreCRDs

func NewCoreCRDs(path string, s *runtime.Scheme) *CoreCRDs

NewCoreCRDs returns a new *CoreCRDs.

func (*CoreCRDs) Run

func (c *CoreCRDs) Run(ctx context.Context, kube client.Client) error

Run applies all CRDs in the given directory.

type Initializer

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

Initializer makes sure the CRDs Crossplane reconciles are ready to go before starting main Crossplane routines.

func New

func New(kube client.Client, steps ...Step) *Initializer

New returns a new *Initializer.

func (*Initializer) Init

func (c *Initializer) Init(ctx context.Context) error

Init does all operations necessary for controllers and webhooks to work.

type LockObject

type LockObject struct{}

LockObject has the initializer for creating the Lock object.

func NewLockObject

func NewLockObject() *LockObject

NewLockObject returns a new *LockObject initializer.

func (*LockObject) Run

func (lo *LockObject) Run(ctx context.Context, kube client.Client) error

Run makes sure Lock object exists.

type PackageInstaller

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

PackageInstaller has the initializer for installing a list of packages.

func NewPackageInstaller

func NewPackageInstaller(p []string, c []string) *PackageInstaller

NewPackageInstaller returns a new package installer.

func (*PackageInstaller) Run

func (pi *PackageInstaller) Run(ctx context.Context, kube client.Client) error

Run makes sure all specified packages exist. NOTE(hasheddan): this function is over our cyclomatic complexity goal, but only runs at installation time and is performing fairly straightforward operations.

type Step

type Step interface {
	Run(ctx context.Context, kube client.Client) error
}

Step is a blocking step of the initialization process.

Jump to

Keyboard shortcuts

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