Documentation ¶
Index ¶
- func ApplySubmitOpts(wf *wfv1.Workflow, opts *wfv1.SubmitOpts) error
- func ConvertYAMLToJSON(str string) (string, error)
- func CreateServerDryRun(wf *wfv1.Workflow, wfClientset wfclientset.Interface) (*wfv1.Workflow, error)
- func FormulateResubmitWorkflow(wf *wfv1.Workflow, memoized bool) (*wfv1.Workflow, error)
- func FromUnstructured(un *unstructured.Unstructured) (*wfv1.Workflow, error)
- func FromUnstructuredObj(un *unstructured.Unstructured, v interface{}) error
- func GetNodeType(tmpl *wfv1.Template) wfv1.NodeType
- func InstanceIDRequirement(instanceID string) labels.Requirement
- func IsJSONStr(str string) bool
- func IsWorkflowCompleted(wf *wfv1.Workflow) bool
- func IsWorkflowSuspended(wf *wfv1.Workflow) bool
- func JoinWorkflowMetaData(wfMetaData, wftMetaData, wfDefaultMetaData *metav1.ObjectMeta)
- func JoinWorkflowSpec(wfSpec, wftSpec, wfDefaultSpec *wfv1.WorkflowSpec) (*wfv1.Workflow, error)
- func MergeTo(patch, target *wfv1.Workflow) error
- func NewWorkflowInformer(dclient dynamic.Interface, ns string, resyncPeriod time.Duration, ...) cache.SharedIndexInformer
- func PodSpecPatchMerge(wf *wfv1.Workflow, tmpl *wfv1.Template) (string, error)
- func PopulateSubmitOpts(command *cobra.Command, submitOpts *wfv1.SubmitOpts, includeDryRun bool)
- func ReadFromFilePathsOrUrls(filePathsOrUrls ...string) ([][]byte, error)
- func ReadFromStdin() ([]byte, error)
- func ReadFromUrl(url string) ([]byte, error)
- func ReadManifest(manifestPaths ...string) ([][]byte, error)
- func ResumeWorkflow(wfIf v1alpha1.WorkflowInterface, hydrator hydrator.Interface, ...) error
- func RetryWorkflow(kubeClient kubernetes.Interface, hydrator hydrator.Interface, ...) (*wfv1.Workflow, error)
- func SelectorMatchesNode(selector fields.Selector, node wfv1.NodeStatus) bool
- func SetWorkflow(wfClient v1alpha1.WorkflowInterface, hydrator hydrator.Interface, name string, ...) error
- func StopWorkflow(wfClient v1alpha1.WorkflowInterface, hydrator hydrator.Interface, name string, ...) error
- func SubmitWorkflow(wfIf v1alpha1.WorkflowInterface, wfClientset wfclientset.Interface, ...) (*wfv1.Workflow, error)
- func SuspendWorkflow(wfIf v1alpha1.WorkflowInterface, workflowName string) error
- func TerminateWorkflow(wfClient v1alpha1.WorkflowInterface, name string) error
- func ToUnstructured(wf *wfv1.Workflow) (*unstructured.Unstructured, error)
- func ValidateJsonStr(jsonStr string, schema interface{}) bool
- type SetOperationValues
- type WorkflowLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySubmitOpts ¶
func ApplySubmitOpts(wf *wfv1.Workflow, opts *wfv1.SubmitOpts) error
Apply the Submit options into workflow object
func ConvertYAMLToJSON ¶
func CreateServerDryRun ¶
func CreateServerDryRun(wf *wfv1.Workflow, wfClientset wfclientset.Interface) (*wfv1.Workflow, error)
CreateServerDryRun fills the workflow struct with the server's representation without creating it and returns an error, if there is any
func FormulateResubmitWorkflow ¶
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. This function performs a lot of allocations and con resulting in a lot of memory being used. Users should avoid invoking this function if the data they need is available from `unstructured.Unstructured`. especially if they're looping. Available values include: `GetLabels()`, `GetName()`, `GetNamespace()` etc. Single values can be accessed using `unstructured.Nested*`, e.g. `unstructured.NestedString(un.Object, "spec", "phase")`.
func FromUnstructuredObj ¶
func FromUnstructuredObj(un *unstructured.Unstructured, v interface{}) error
func InstanceIDRequirement ¶
func InstanceIDRequirement(instanceID string) labels.Requirement
InstanceIDRequirement returns the label requirement to filter against a controller instance (or not)
func IsWorkflowCompleted ¶
IsWorkflowCompleted returns whether or not a workflow is considered completed
func IsWorkflowSuspended ¶
IsWorkflowSuspended returns whether or not a workflow is considered suspended
func JoinWorkflowMetaData ¶
func JoinWorkflowMetaData(wfMetaData, wftMetaData, wfDefaultMetaData *metav1.ObjectMeta)
JoinWorkflowMetaData will join the workflow metadata with the following order of preference 1. Workflow, 2 WorkflowTemplate (WorkflowTemplateRef), 3. WorkflowDefault.
func JoinWorkflowSpec ¶
func JoinWorkflowSpec(wfSpec, wftSpec, wfDefaultSpec *wfv1.WorkflowSpec) (*wfv1.Workflow, error)
JoinWorkflowSpec will join the workflow specs with the following order of preference 1. Workflow Spec, 2 WorkflowTemplate Spec (WorkflowTemplateRef), 3. WorkflowDefault Spec.
func MergeTo ¶
MergeTo will merge one workflow (the "patch" workflow) into another (the "target" workflow. If the target workflow defines a field, this take precedence over the patch.
func NewWorkflowInformer ¶
func NewWorkflowInformer(dclient dynamic.Interface, ns string, resyncPeriod time.Duration, tweakListOptions internalinterfaces.TweakListOptionsFunc, indexers cache.Indexers) 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 PodSpecPatchMerge ¶
PodSpecPatchMerge will do strategic merge the workflow level PodSpecPatch and template level PodSpecPatch
func PopulateSubmitOpts ¶
func PopulateSubmitOpts(command *cobra.Command, submitOpts *wfv1.SubmitOpts, includeDryRun bool)
func ReadFromFilePathsOrUrls ¶
ReadFromFilePathsOrUrls reads the content of a single or a list of file paths and/or urls
func ReadManifest ¶
ReadManifest reads from stdin, a single file/url, or a list of files and/or urls
func ResumeWorkflow ¶
func ResumeWorkflow(wfIf v1alpha1.WorkflowInterface, hydrator hydrator.Interface, workflowName string, nodeFieldSelector 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, hydrator hydrator.Interface, wfClient v1alpha1.WorkflowInterface, name string, restartSuccessful bool, nodeFieldSelector string) (*wfv1.Workflow, error)
RetryWorkflow updates a workflow, deleting all failed steps as well as the onExit node (and children)
func SelectorMatchesNode ¶
func SelectorMatchesNode(selector fields.Selector, node wfv1.NodeStatus) bool
func SetWorkflow ¶
func SetWorkflow(wfClient v1alpha1.WorkflowInterface, hydrator hydrator.Interface, name string, nodeFieldSelector string, values SetOperationValues) error
func StopWorkflow ¶
func StopWorkflow(wfClient v1alpha1.WorkflowInterface, hydrator hydrator.Interface, name string, nodeFieldSelector string, message string) error
StopWorkflow terminates a workflow by setting its spec.shutdown to ShutdownStrategyStop Or terminates a single resume step referenced by nodeFieldSelector
func SubmitWorkflow ¶
func SubmitWorkflow(wfIf v1alpha1.WorkflowInterface, wfClientset wfclientset.Interface, namespace string, wf *wfv1.Workflow, opts *wfv1.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 spec.shutdown to ShutdownStrategyTerminate
func ToUnstructured ¶
func ToUnstructured(wf *wfv1.Workflow) (*unstructured.Unstructured, error)
ToUnstructured converts an workflow to an Unstructured object
func ValidateJsonStr ¶
Types ¶
type SetOperationValues ¶
type WorkflowLister ¶
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