util

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecompressWorkflow

func DecompressWorkflow(wf *wfv1.Workflow) error

DecompressWorkflow decompresses the compressed status of a workflow (if compressed)

func FormulateResubmitWorkflow

func FormulateResubmitWorkflow(wf *wfv1.Workflow, memoized bool) (*wfv1.Workflow, error)

FormulateResubmitWorkflow formulate a new workflow from a previous workflow, optionally re-using successful nodes

func FromUnstructured

func FromUnstructured(un *unstructured.Unstructured) (*wfv1.Workflow, error)

FromUnstructured converts an unstructured object to a workflow

func InstanceIDRequirement

func InstanceIDRequirement(instanceID string) labels.Requirement

InstanceIDRequirement returns the label requirement to filter against a controller instance (or not)

func IsWorkflowCompleted

func IsWorkflowCompleted(wf *wfv1.Workflow) bool

IsWorkflowCompleted returns whether or not a workflow is considered completed

func IsWorkflowSuspended

func IsWorkflowSuspended(wf *wfv1.Workflow) bool

IsWorkflowSuspended returns whether or not a workflow is considered suspended

func IsWorkflowTerminated

func IsWorkflowTerminated(wf *wfv1.Workflow) bool

func NewWorkflowInformer

func NewWorkflowInformer(cfg *rest.Config, ns string, resyncPeriod time.Duration, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer

NewWorkflowInformer returns the workflow informer used by the controller. This is actually a custom built UnstructuredInformer which is in actuality returning unstructured.Unstructured objects. We no longer return WorkflowInformer due to: https://github.com/kubernetes/kubernetes/issues/57705 https://github.com/argoproj/argo/issues/632

func ResumeWorkflow

func ResumeWorkflow(wfIf v1alpha1.WorkflowInterface, workflowName string) error

ResumeWorkflow resumes a workflow by setting spec.suspend to nil and any suspended nodes to Successful. Retries conflict errors

func RetryWorkflow

func RetryWorkflow(kubeClient kubernetes.Interface, wfClient v1alpha1.WorkflowInterface, wf *wfv1.Workflow) (*wfv1.Workflow, error)

RetryWorkflow updates a workflow, deleting all failed steps as well as the onExit node (and children)

func SubmitWorkflow

func SubmitWorkflow(wfIf v1alpha1.WorkflowInterface, wf *wfv1.Workflow, opts *SubmitOpts) (*wfv1.Workflow, error)

SubmitWorkflow validates and submit a single workflow and override some of the fields of the workflow

func SuspendWorkflow

func SuspendWorkflow(wfIf v1alpha1.WorkflowInterface, workflowName string) error

SuspendWorkflow suspends a workflow by setting spec.suspend to true. Retries conflict errors

func TerminateWorkflow

func TerminateWorkflow(wfClient v1alpha1.WorkflowInterface, name string) error

TerminateWorkflow terminates a workflow by setting its activeDeadlineSeconds to 0

func ToUnstructured

func ToUnstructured(wf *wfv1.Workflow) (*unstructured.Unstructured, error)

ToUnstructured converts an workflow to an Unstructured object

Types

type SubmitOpts

type SubmitOpts struct {
	Name           string                 // --name
	GenerateName   string                 // --generate-name
	InstanceID     string                 // --instanceid
	Entrypoint     string                 // --entrypoint
	Parameters     []string               // --parameter
	ParameterFile  string                 // --parameter-file
	ServiceAccount string                 // --serviceaccount
	OwnerReference *metav1.OwnerReference // useful if your custom controller creates argo workflow resources
}

SubmitOpts are workflow submission options

type WorkflowLister

type WorkflowLister interface {
	List() ([]*wfv1.Workflow, error)
}

WorkflowLister implements the List() method of v1alpha.WorkflowLister interface but does so using an Unstructured informer and converting objects to workflows. Ignores objects that failed to convert.

func NewWorkflowLister

func NewWorkflowLister(informer cache.SharedIndexInformer) WorkflowLister

NewWorkflowLister returns a new workflow lister

Jump to

Keyboard shortcuts

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