initializer

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: Apache-2.0 Imports: 11 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 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 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