controller

package
v2.5.0-rc4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDeadlineExceeded indicates the operation exceeded its deadline for execution
	ErrDeadlineExceeded = errors.New(errors.CodeTimeout, "Deadline exceeded")
	// ErrParallelismReached indicates this workflow reached its parallelism limit
	ErrParallelismReached = errors.New(errors.CodeForbidden, "Max parallelism reached")
)

Functions

func ReadConfigMapValue

func ReadConfigMapValue(clientset kubernetes.Interface, namespace string, name string, key string) (string, error)

Types

type Throttler

type Throttler interface {
	Add(key interface{}, priority int32, creationTime time.Time)
	// Next returns true if item should be processed by controller now or return false.
	Next(key interface{}) (interface{}, bool)
	// Remove notifies throttler that item processing is done. In responses the throttler triggers processing of previously throttled items.
	Remove(key interface{})
	// SetParallelism update throttler parallelism limit.
	SetParallelism(parallelism int)
}

Throttler allows CRD controller to limit number of items it is processing in parallel.

func NewThrottler

func NewThrottler(parallelism int, queue workqueue.RateLimitingInterface) Throttler

type WorkflowController

type WorkflowController struct {

	// Config is the workflow controller's configuration
	Config config.WorkflowControllerConfig
	// contains filtered or unexported fields
}

WorkflowController is the controller for workflow resources

func NewWorkflowController

func NewWorkflowController(
	restConfig *rest.Config,
	kubeclientset kubernetes.Interface,
	wfclientset wfclientset.Interface,
	namespace string,
	managedNamespace string,
	executorImage,
	executorImagePullPolicy,
	containerRuntimeExecutor,
	configMap string,
) *WorkflowController

NewWorkflowController instantiates a new WorkflowController

func (*WorkflowController) GetContainerRuntimeExecutor

func (wfc *WorkflowController) GetContainerRuntimeExecutor() string

func (*WorkflowController) GetManagedNamespace

func (wfc *WorkflowController) GetManagedNamespace() string

func (*WorkflowController) MetricsServer

func (wfc *WorkflowController) MetricsServer(ctx context.Context)

MetricsServer starts a prometheus metrics server if enabled in the configmap

func (*WorkflowController) ResyncConfig

func (wfc *WorkflowController) ResyncConfig() error

ResyncConfig reloads the controller config from the configmap

func (*WorkflowController) Run

func (wfc *WorkflowController) Run(ctx context.Context, wfWorkers, podWorkers int)

Run starts an Workflow resource controller

func (*WorkflowController) RunTTLController

func (wfc *WorkflowController) RunTTLController(ctx context.Context)

RunTTLController runs the workflow TTL controller

func (*WorkflowController) TelemetryServer

func (wfc *WorkflowController) TelemetryServer(ctx context.Context)

TelemetryServer starts a prometheus telemetry server if enabled in the configmap

Jump to

Keyboard shortcuts

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