Deep Dive into the New Features of Argo Workflows 3.6
This article provides a comprehensive analysis of Argo Workflows 3.6, covering its enhanced scheduling, UI improvements, controller stability and security upgrades, OSS artifact garbage collection, dynamic template references, expanded expression library, and CLI usability, along with practical YAML examples for each feature.
Argo Workflows, a CNCF graduated project, is designed to orchestrate parallel jobs on Kubernetes; this article examines the key new features introduced in version 3.6.
The platform is widely used for batch processing, machine‑learning pipelines, infrastructure automation, and CI/CD, offering a declarative way to define and run large‑scale tasks.
Alibaba Cloud Container Service, an early adopter, contributed numerous enhancements to v3.6, including massive‑parameter offload, template scheduling constraints, large‑scale flat workflow parallel parsing, OSS artifact streaming and garbage collection, pod parallel cleanup with retry, and dynamic template references, all aimed at improving stability, usability, and performance.
1) CronWorkflows – scheduling enhancements – support for multiple cron schedules in a single workflow, a stop‑strategy to prevent backlog of failing runs, and a when expression for conditional execution. Example:
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: cron-workflow-example
spec:
schedules:
- "*/3 * * * *"
- "*/5 * * * *"
concurrencyPolicy: "Allow"
stopStrategy:
condition: "failed >= 10"
when: "{{= cronworkflow.lastScheduledTime == nil || (now() - cronworkflow.lastScheduledTime).Seconds() > 3600 }}"
startingDeadlineSeconds: 0
workflowSpec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: alpine:3.6
command: [sh, -c]
args: ["date; sleep 1"]2) UI improvements – added detailed workflow information, time stamps, artifact directory view, Markdown support, and access to execution history and real‑time logs for both CronWorkflows and WorkflowTemplates.
3) Controller upgrades – enhancements for large‑scale stability and security, including queued workflow archiving, parallel pod cleanup, finalizers to avoid premature pod deletion, massive flat‑workflow parallel parsing, automatic seccomp profile setting, and more.
a) OSS artifact automatic garbage collection with configurable artifactGC strategy. Example:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-gc-
spec:
entrypoint: main
artifactGC:
strategy: OnWorkflowDeletion
templates:
- name: main
container:
image: argoproj/argosay:v2
command: [sh, -c]
args: ["echo \"hello world\" > /tmp/on-completion.txt"]
outputs:
artifacts:
- name: on-completion
path: /tmp/on-completion.txt
oss:
endpoint: http://oss-cn-zhangjiakou-internal.aliyuncs.com
bucket: my-argo-workflow
key: on-completion.txt
accessKeySecret:
name: my-argo-workflow-credentials
key: accessKey
secretKeySecret:
name: my-argo-workflow-credentials
key: secretKey
artifactGC:
strategy: OnWorkflowCompletionb) Template scheduling constraints via nodeSelector and tolerations . Example:
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: benchmarks
spec:
entrypoint: main
serviceAccountName: workflow
templates:
- dag:
tasks:
- name: benchmark
template: benchmark
- name: main
nodeSelector:
pool: workflows
tolerations:
- key: pool
operator: Equal
value: workflowsc) Dynamic template references allowing parameters to be injected directly into templateRef fields, reducing YAML size and improving readability. Example:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-wf-global-arg-
namespace: default
spec:
entrypoint: whalesay
arguments:
parameters:
- name: global-parameter
value: hello
templates:
- name: whalesay
steps:
- - name: hello-world
templateRef:
name: '{{item.workflow-template}}'
template: '{{item.template-name}}'
withItems:
- {workflow-template: 'hello-world-template-global-arg', template-name: 'hello-world'}
- name: hello-world-dag
template: diamond
- name: diamond
dag:
tasks:
- name: A
templateRef:
name: '{{item.workflow-template}}'
template: '{{item.template-name}}'
withItems:
- {workflow-template: 'hello-world-template-global-arg', template-name: 'hello-world'}d) Updated expression library supporting additional functions such as list concatenation and string joining. Example:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: test-expression-
namespace: argo
spec:
entrypoint: main
arguments:
parameters:
- name: expr
value: "{{= concat(['a', 'b'], ['c', 'd']) | join('\n') }}"
templates:
- name: main
inputs:
parameters:
- name: expr
script:
image: alpine:3.6
command: ["sh"]
source: |
echo result: '{{ inputs.parameters.expr }}'"4) Argo CLI enhancements – simplified commands for updating CronWorkflows, workflow templates, and cluster‑templates, and label‑based filtering for template management, e.g., argo template list -l app=test .
Finally, the article highlights that Argo Workflows is a cloud‑native batch‑task engine suitable for architects, data scientists, and DevOps engineers, and mentions Alibaba Cloud’s fully managed Serverless Argo Workflows offering with simple REST API and Python SDK, high performance, and extensive best‑practice documentation.
Alibaba Cloud Infrastructure
For uninterrupted computing services
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.