ArgoWorkflowTemplate
Bases: DuploResource
Manage Argo Workflow Templates in DuploCloud.
Provides commands to list, get, create, update, delete, and apply Argo Workflow Templates via the DuploCloud proxy.
apply
Apply Workflow Template
Create or update a workflow template. If the template exists it will be updated; otherwise a new template is created.
Basic CLI Use
Contents of thetemplate.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow template specification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
template |
dict
|
The created or updated workflow template object. |
create
Create Workflow Template
Create a new Argo Workflow Template.
Basic CLI Use
Contents of thetemplate.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow template specification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
template |
dict
|
The created workflow template object. |
delete
Delete Workflow Template
Delete a workflow template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow template to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
dict
|
Deletion confirmation. |
find
Get Workflow Template
Find a specific workflow template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow template. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
template |
dict
|
The full workflow template object. |
list
List Workflow Templates
Retrieve all workflow templates in the current tenant namespace.
Returns:
| Name | Type | Description |
|---|---|---|
templates |
dict
|
A dict containing the list of Argo workflow templates. |
update
Update Workflow Template
Update an existing Argo Workflow Template. Fetches the current resourceVersion and merges it into the body before submitting.
Basic CLI Use
Contents of thetemplate.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow template specification with name in metadata. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
template |
dict
|
The updated workflow template object. |
Raises:
| Type | Description |
|---|---|
DuploError
|
If the template name is missing from metadata. |
wait
Wait for Resource
Waits for a the given wait_check callable to complete successfully. If the global wait_timeout is set on the DuploCtl, it will override the timeout parameter so that a user can always choose their own timeout for waiting operations. The timeout param for other functions is just a default value for that particular resource operation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wait_check
|
callable
|
A callable function to check if the resource is ready. |
required |
timeout
|
int
|
The maximum time to wait in seconds. Default is 3600 seconds (1 hour). |
3600
|
poll
|
int
|
The polling interval in seconds. Default is 10 seconds. |
10
|