Skip to content

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.

Basic CLI Use
duploctl argo_wf_template <action>

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

duploctl argo_wf_template apply -f template.yaml
Contents of the template.yaml file
template:
  metadata:
    name: duploctl-test-hello-world
  spec:
    entrypoint: hello
    templates:
      - name: hello
        container:
          image: alpine:latest
          command: [echo]
          args: ["Hello from duploctl test!"]

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

duploctl argo_wf_template create -f template.yaml
Contents of the template.yaml file
template:
  metadata:
    name: duploctl-test-hello-world
  spec:
    entrypoint: hello
    templates:
      - name: hello
        container:
          image: alpine:latest
          command: [echo]
          args: ["Hello from duploctl test!"]

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.

Basic CLI Use
duploctl argo_wf_template delete <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.

Basic CLI Use
duploctl argo_wf_template find <name>
Get template entrypoint
duploctl argo_wf_template find my-template --query "spec.entrypoint"

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.

Basic CLI Use
duploctl argo_wf_template list
List template names only
duploctl argo_wf_template list --query "items[*].metadata.name"

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

duploctl argo_wf_template update -f template.yaml
Contents of the template.yaml file
template:
  metadata:
    name: duploctl-test-hello-world
  spec:
    entrypoint: hello
    templates:
      - name: hello
        container:
          image: alpine:latest
          command: [echo]
          args: ["Hello from duploctl test!"]

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