controller

package
v2.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 56 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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,
	executorImage,
	executorImagePullPolicy,
	configMap string,
) *WorkflowController

NewWorkflowController instantiates a new WorkflowController

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