Skip to content

ArgoWorkflow

Bases: DuploResource

Resource for creating and managing Argo Workflow resources in DuploCloud.

This resource provides commands to interact with Argo Workflows via the DuploCloud proxy. It handles the two-step authentication: first obtaining an Argo token from Duplo, then using that token to communicate with the Argo Workflow API.

Basic CLI Use
duploctl argo_wf <action>

namespace property

Get the Kubernetes namespace for the current tenant using system prefix.

info

This is not a cli command. It's used internally.

tenant property

Get the current tenant.

info

This is not a cli command. It's used internally.

tenant_id property

Get the current tenant ID.

info

This is not a cli command. It's used internally.

auth

Get Argo Authentication Info

Retrieve the Argo Workflow authentication token and admin status for the current tenant.

Basic CLI Use

```bash duploctl argo_wf auth

if response.status_code == 204 or not response.content: return {} return response.json()

Returns: dict: Authentication info with Token, IsAdmin, TenantId, ExpiresAt

create_template

Create Workflow Template

Create a new workflow template.

Basic CLI Use

duploctl argo_wf create_template -f template.yaml
Contents of the template.yaml file
template:
  metadata:
    name: duploctl-test-hello-world
    namespace: my-tenant
  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
dict dict

The created workflow template object.

delete_template

Delete Workflow Template

Delete a workflow template by name.

Basic CLI Use
duploctl argo_wf delete_template <name>

Parameters:

Name Type Description Default
name NAME

The name of the workflow template to delete.

required

Returns:

Name Type Description
dict dict

Deletion confirmation.

delete_workflow

Delete Workflow

Delete a workflow by name.

Basic CLI Use
duploctl argo_wf delete_workflow <name>

Parameters:

Name Type Description Default
name NAME

The name of the workflow to delete.

required

Returns:

Name Type Description
dict dict

Deletion confirmation.

get_template

Get Workflow Template

Retrieve a specific workflow template by name.

Basic CLI Use
duploctl argo_wf get_template <name>

Parameters:

Name Type Description Default
name NAME

The name of the workflow template.

required

Returns:

Name Type Description
dict dict

The workflow template object.

get_workflow

Get Workflow

Retrieve a specific workflow by name.

Basic CLI Use
duploctl argo_wf get_workflow <name>

Parameters:

Name Type Description Default
name NAME

The name of the workflow.

required

Returns:

Name Type Description
dict dict

The workflow object.

list_templates

List Workflow Templates

Retrieve a list of all workflow templates in the current tenant/namespace.

Basic CLI Use
duploctl argo_wf list_templates

Returns:

Name Type Description
list list

A list of workflow templates.

list_workflows

List Workflows

Retrieve a list of all workflows in the current tenant/namespace.

Basic CLI Use
duploctl argo_wf list_workflows

Returns:

Name Type Description
list list

A list of workflows.

submit

Submit Workflow

Submit a new workflow from a workflow spec.

Basic CLI Use

duploctl argo_wf submit -f workflow.yaml
Contents of the workflow.yaml file
workflow:
  metadata:
    generateName: duploctl-test-wf-
    namespace: my-tenant
  spec:
    entrypoint: hello
    templates:
      - name: hello
        container:
          image: alpine:latest
          command: [echo]
          args: ["Hello from duploctl workflow test!"]

Parameters:

Name Type Description Default
body BODY

The workflow specification.

required

Returns:

Name Type Description
dict dict

The created workflow object.

wait

Wait for Resource

Waits for a the given wait_check callable to complete successfully. If the global wait_timeout is set on the DuploClient, 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