initializer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 12 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 Initializer

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

Initializer makes sure the objects ndd reconciles are ready to go before starting core ndd 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 RegistrationObject

type RegistrationObject struct{}

RegistrationObject has the initializer for creating the Registration object.

func NewRegistrationObject

func NewRegistrationObject() *RegistrationObject

NewRegistrationObject returns a new *RegistrationObject initializer.

func (*RegistrationObject) Run

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

Run makes sure Registration object exists.

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