Help us shape the future of Go! Take the 2026 Go Developer Survey

controller

package
v4.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 112 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDeadlineExceeded indicates the operation exceeded its deadline for execution
	ErrDeadlineExceeded = argoerrors.New(argoerrors.CodeTimeout, "Deadline exceeded")
	// ErrParallelismReached indicates this workflow reached its parallelism limit
	ErrParallelismReached       = argoerrors.New(argoerrors.CodeForbidden, "Max parallelism reached")
	ErrResourceRateLimitReached = argoerrors.New(argoerrors.CodeForbidden, "resource creation rate-limit reached")
	// ErrTimeout indicates a specific template timed out
	ErrTimeout = argoerrors.New(argoerrors.CodeTimeout, "timeout")
	// ErrMaxDepthExceeded indicates that the maximum recursion depth was exceeded
	ErrMaxDepthExceeded = argoerrors.New(argoerrors.CodeTimeout, fmt.Sprintf("Maximum recursion depth exceeded. See %s", help.ConfigureMaximumRecursionDepth()))
	// ErrRequeue indicates the workflow should be requeued for later processing
	ErrRequeue = errors.New("requeue")
)

Functions

func FindRetryNode

func FindRetryNode(nodes wfv1.Nodes, nodeID string) *wfv1.NodeStatus

FindRetryNode locates the closest retry node ancestor to nodeID

func GetRequeueTime

func GetRequeueTime() time.Duration

func LogMiddleware

func LogMiddleware(logger logging.Logger, next http.Handler) http.Handler

Types

type RetryTweak

type RetryTweak = func(retryStrategy wfv1.RetryStrategy, nodes wfv1.Nodes, pod *apiv1.Pod)

RetryTweak is a 2nd order function interface for tweaking the retry

func RetryOnDifferentHost

func RetryOnDifferentHost(retryNodeName string) RetryTweak

RetryOnDifferentHost append affinity with fail host to pod

type TaskResults

type TaskResults struct {
	Succeeded    bool `json:"Succeeded"`
	Failed       bool `json:"Failed"`
	Errored      bool `json:"Errored"`
	Skipped      bool `json:"Skipped"`
	Omitted      bool `json:"Omitted"`
	Daemoned     bool `json:"Daemoned"`
	AnySucceeded bool `json:"AnySucceeded"`
	AllFailed    bool `json:"AllFailed"`
}

type WorkflowController

type WorkflowController struct {

	// Config is the workflow controller's configuration
	Config config.Config

	PodController *pod.Controller // Currently public for woc to access, but would rather an accessor
	// contains filtered or unexported fields
}

WorkflowController is the controller for workflow resources

func NewWorkflowController

func NewWorkflowController(ctx context.Context, restConfig *rest.Config, kubeclientset kubernetes.Interface, wfclientset wfclientset.Interface, namespace, managedNamespace, executorImage, executorImagePullPolicy, executorLogFormat, configMap string, executorPlugins bool) (*WorkflowController, error)

NewWorkflowController instantiates a new WorkflowController

func (*WorkflowController) GetManagedNamespace

func (wfc *WorkflowController) GetManagedNamespace() string

func (*WorkflowController) Healthz

func (wfc *WorkflowController) Healthz(w http.ResponseWriter, r *http.Request)

https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-http-request If we are in a state where there are any workflows that have not been reconciled in the last 2m, we've gone wrong.

func (*WorkflowController) IsLeader

func (wfc *WorkflowController) IsLeader() bool

func (*WorkflowController) Run

func (wfc *WorkflowController) Run(ctx context.Context, wfWorkers, workflowTTLWorkers, podCleanupWorkers, cronWorkflowWorkers, wfArchiveWorkers int)

Run starts a Workflow resource controller

func (*WorkflowController) RunPrometheusServer

func (wfc *WorkflowController) RunPrometheusServer(ctx context.Context, isDummy bool)

func (*WorkflowController) UpdateConfig

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

Directories

Path Synopsis
Package pod implements pod life cycle management
Package pod implements pod life cycle management

Jump to

Keyboard shortcuts

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