actor

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEBUGLEVEL = int(zapcore.DebugLevel)

Different logging levels

View Source
var Log = logf.Log.WithName("action")

Log var

View Source
var WARNLEVEL = int(zapcore.WarnLevel)

Functions

func CancelLoop

func CancelLoop(ctx context.Context)

CancelLoop func

func ContextWithCancelFn

func ContextWithCancelFn(ctx context.Context, fn context.CancelFunc) context.Context

ContextWithCancelFn func

func IsContainerStatusImagePullBackoff

func IsContainerStatusImagePullBackoff(
	ctx context.Context,
	clientset kubernetes.Interface,
	job *kbatch.Job,
	l logr.Logger,
	image string,
) error

func IsJobPodRunning

func IsJobPodRunning(
	ctx context.Context,
	clientset kubernetes.Interface,
	job *kbatch.Job,
	l logr.Logger,
) error

func LogError

func LogError(msg string, err error, l logr.Logger) error

func WaitUntilJobPodIsRunning

func WaitUntilJobPodIsRunning(ctx context.Context, clientset kubernetes.Interface, job *kbatch.Job, l logr.Logger) error

Types

type Actor

type Actor interface {
	Handles([]api.ClusterCondition) bool
	Act(context.Context, *resource.Cluster) error
	GetActionType() api.ActionType
}

Actor is one action against the cluster if the cluster resource state can be handled

func NewOperatorActions

func NewOperatorActions(scheme *runtime.Scheme, cl client.Client, config *rest.Config) []Actor

NewOperatorActions creates a slice of actors that control the actions or actors for the operator. The order of the slice is critical so that the actors run in order, for instance update has to happen before deploy.

type InvalidContainerVersionError

type InvalidContainerVersionError struct {
	Err error
}

InvalidContainerVersionError error used to stop requeue the request on failure

func (InvalidContainerVersionError) Error

type NotReadyErr

type NotReadyErr struct {
	Err error
}

NotReadyErr strut

func (NotReadyErr) Error

func (e NotReadyErr) Error() string

type PermanentErr

type PermanentErr struct {
	Err error
}

PermanentErr struct

func (PermanentErr) Error

func (e PermanentErr) Error() string

type ValidationError

type ValidationError struct {
	Err error
}

ValidationError error used to stop requeue the request on failure

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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