# Argo Workflows

**Argo Workflows** 是一个开源、容器原生的流程引擎，用于在 [Kubernetes](https://www.edgepedia.org/zh/kubernetes) 上编排并行作业，以 Kubernetes CRD（自定义资源定义）的形式实现。工作流以声明式方式定义，每个步骤作为一个容器运行，多步骤工作流既可以建模为一系列任务，也可以建模为捕获任务间依赖关系的有向无环图（DAG）。<sup>[1](https://argoproj.github.io/workflows/)</sup> 它是 Argo 项目的一部分，该项目于 2022 年 12 月从[云原生计算基金会](https://www.edgepedia.org/zh/cloud-native-computing-foundation)（CNCF）毕业。<sup>[2](https://www.cncf.io/projects/argo/)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 开源、容器原生的流程引擎，用于在 Kubernetes 上编排并行作业，以 Kubernetes CRD 实现<sup>[1](https://argoproj.github.io/workflows/)</sup> |
| 工作流风格 | 基于 DAG 或 Steps 的声明；每个 Step 和每个 DAG Task 都会生成一个 Pod<sup>[3](https://argo-workflows.readthedocs.io/en/latest/)</sup><sup> • </sup><sup>[4](https://argoproj.github.io/argo-workflows/architecture/)</sup> |
| 架构 | 两个 Deployment：负责调谐的 Workflow Controller，以及提供 API 的 Argo Server<sup>[4](https://argoproj.github.io/argo-workflows/architecture/)</sup> |
| 项目历史 | 2017 年由 Applatix 创建并开源，后被 Intuit 收购；2020 年 3 月 26 日进入 CNCF 孵化阶段；2022 年 12 月 6 日毕业<sup>[5](https://www.cncf.io/announcements/2022/12/06/the-cloud-native-computing-foundation-announces-argo-has-graduated/)</sup><sup> • </sup><sup>[2](https://www.cncf.io/projects/argo/)</sup> |
| 最新版本 | v4.1.4，发布于 2026 年 9 月 18 日<sup>[6](https://github.com/argoproj/argo-workflows/releases/)</sup> |
| 支持政策 | 为最近两个次版本维护发布分支；约每 6 个月发布一个新的次版本，补丁版本通常每两周发布一次<sup>[7](https://endoflife.date/argo-workflows)</sup> |
| SDK | Java、Golang、Python（Hera）和 TypeScript（Juno）<sup>[3](https://argo-workflows.readthedocs.io/en/latest/)</sup> |
| 许可证与仓库 | Apache-2.0；argoproj/argo-workflows 仓库有 17.1k 星标和 3.7k 复刻<sup>[8](https://github.com/argoproj/argo-workflows)</sup> |

## 历史与 CNCF 状态

Argo 项目由 Applatix 于 2017 年创建并开源，Applatix 后来被 Intuit 收购；Intuit 与向该项目贡献了 Argo Events 的 [BlackRock](https://www.edgepedia.org/zh/blackrock) 一道，深度参与了项目的开发与社区建设。<sup>[5](https://www.cncf.io/announcements/2022/12/06/the-cloud-native-computing-foundation-announces-argo-has-graduated/)</sup> CNCF 项目页面记录的最早提交日期为 2017 年 7 月 27 日。<sup>[2](https://www.cncf.io/projects/argo/)</sup> Argo 于 2020 年 3 月 26 日被 CNCF 接纳为孵化成熟度级别，并于 2022 年 12 月 6 日晋升为毕业成熟度级别，与 Kubernetes、Prometheus 和 Envoy 等毕业项目并列。<sup>[2](https://www.cncf.io/projects/argo/)</sup><sup> • </sup><sup>[5](https://www.cncf.io/announcements/2022/12/06/the-cloud-native-computing-foundation-announces-argo-has-graduated/)</sup>

毕业要求项目满足 CNCF 的各项要求，例如明确的治理与提交者流程、强劲的增长与采用情况，以及严格的安全与合规实践：Argo 已获得并持续持有 OpenSSF 最佳实践徽章，并于 2022 年 7 月接受了第三方安全审计。<sup>[5](https://www.cncf.io/announcements/2022/12/06/the-cloud-native-computing-foundation-announces-argo-has-graduated/)</sup> 毕业时，CNCF 将 Adobe、BlackRock、Capital One、Google、Intuit、Peloton、Tesla 和 [Ticketmaster](https://www.edgepedia.org/zh/ticketmaster) 列为该项目的用户，CERN 的计算工程师 Ricardo Rocha 称 Argo Workflows 为物理学家提供了一种以声明式方式管理其全部分析代码的新方法。<sup>[5](https://www.cncf.io/announcements/2022/12/06/the-cloud-native-computing-foundation-announces-argo-has-graduated/)</sup>

## 架构

Argo Workflows 以两个 Deployment 的形式运行在 `argo` 命名空间中：Workflow Controller 负责所有 Workflow 资源的调谐，Argo Server 则开启 HTTP(S) 监听并提供 API。控制器可以独立使用，在集群安装或托管命名空间安装模式下，Workflow 及其 Pod 运行在单独的命名空间中。<sup>[4](https://argoproj.github.io/argo-workflows/architecture/)</sup>

每个 Step 和每个 DAG Task 都会生成一个 Pod，这些 Pod 每个都由三个容器组成：<sup>[4](https://argoproj.github.io/argo-workflows/architecture/)</sup>

- `main`，运行用户指定的镜像，并挂载 `argoexec` 工具卷；`argoexec` 作为主命令，将配置的命令作为子进程调用。
- `init`，一个 InitContainer，负责获取工件和参数并将其提供给 `main`。
- `wait`，执行清理任务，包括保存参数和工件。

**无 Init 的 Pod 布局。** 当控制器配置了 `initlessPod.enabled: true` 时，工作流 Pod 会采用另一种需显式启用的 beta 双容器布局，不含任何 init 容器。`argoexec` 二进制通过 Kubernetes 镜像卷（KEP-4639，在 Kubernetes 1.33 中作为 beta 特性位于特性门控之后，在 1.36 中正式可用）传入 `main`，一个新的 `supervisor` 容器同时接管旧式 init 容器的 main 前置职责（模板写入、脚本暂存、输入工件下载）和旧式 `wait` 容器的 main 后置职责（观察 main、捕获输出、保存工件和日志）。工件插件作为常规边车容器运行，而非 init 容器。<sup>[4](https://argoproj.github.io/argo-workflows/architecture/)</sup>

控制器的调谐循环使用一组工作协程，根据 Workflow 和 Workflow Pod 的新增与更新，处理加入队列的 Workflow，并为 Workflow CRD 及 Argo Workflows 使用的其他 CRD 配置 informer；控制器可以并发处理多个 Workflow，且可以增加工作流工作协程的数量以提高并发度。<sup>[4](https://argoproj.github.io/argo-workflows/architecture/)</sup><sup> • </sup><sup>[15](https://github.com/argoproj/argo-workflows/blob/main/docs/scaling.md)</sup>

## 定义工作流

工作流规约由一组 Argo 模板构建而成。每个模板都有一个输入部分和一个输出部分（两者均可选），外加一个容器调用或一个步骤列表，每个步骤调用另一个模板。<sup>[9](https://argoproj.github.io/argo-workflows/walk-through/the-structure-of-workflow-specs/)</sup> 工作流也可以不采用步骤序列，而采用有向无环图的形式，声明每个任务的依赖关系；对于复杂的工作流，DAG 更易于维护，并允许任务以最大可能的并行度运行。在文档的菱形示例中，步骤 A 首先运行且无依赖，步骤 B 和 C 在 A 完成后并行运行，步骤 D 在 B 和 C 完成后运行。由 DAG 或 steps 模板调用的模板本身也可以是 DAG 或 steps 模板，从而将复杂的工作流拆解为更易处理的部分。<sup>[10](https://argoproj.github.io/argo-workflows/walk-through/dag/)</sup>

## 特性

该项目的特性列表包括：用于可视化和管理工作流的 UI；对 S3、Artifactory、阿里云 OSS、Azure Blob Storage、HTTP、Git、GCS、raw 及插件的工件支持；用于在集群中存储常用工作流的工作流模板化；执行后工作流的归档；使用 cron 的定时工作流；基于 HTTP 和 [GRPC](https://www.edgepedia.org/zh/grpc) 提供 REST API 的服务器接口；基于 DAG 或 Steps 的声明；步骤级输入与输出（工件和参数）；循环、参数化和条件；步骤级和工作流级的超时与重试、重新提交（记忆化）、挂起与恢复、取消；Kubernetes 资源编排；用于通知和清理的退出钩子；已完成工作流的垃圾回收；并行度限制；Prometheus 指标；单点登录（OAuth2/OIDC）；webhook 触发；CLI；Windows 容器支持；以及带多路日志查看器的嵌入式小部件。<sup>[3](https://argo-workflows.readthedocs.io/en/latest/)</sup>

客户端库有 Java、Golang、Python（Hera）和 [TypeScript](https://www.edgepedia.org/zh/typescript)（Juno）版本。<sup>[3](https://argo-workflows.readthedocs.io/en/latest/)</sup> `argo` CLI 以压缩二进制形式分发，支持 linux-amd64、linux-arm64、linux-ppc64le、linux-riscv64、linux-s390x 和 windows-amd64，每个都附带 sha256 校验和发布。<sup>[6](https://github.com/argoproj/argo-workflows/releases/)</sup>

## 发布与支持

最新版本是 v4.1.4，发布于 2026 年 9 月 18 日。<sup>[6](https://github.com/argoproj/argo-workflows/releases/)</sup> Argo Workflows 为最近两个次版本维护发布分支；新的次版本大约每 6 个月发布一次，补丁版本通常每两周发布一次。<sup>[7](https://endoflife.date/argo-workflows)</sup> 截至 2026 年 10 月 10 日更新的 endoflife.date 表格，受支持的版本线为 4.1（发布于 2026 年 8 月 11 日，最新为 2026 年 10 月 9 日的 4.1.5）和 4.0（发布于 2026 年 2 月 4 日，最新为 2026 年 10 月 9 日的 4.0.13）；3.7 版本线发布于 2025 年 7 月 23 日，于 2026 年 8 月 14 日结束支持，3.6 和 3.5 则分别于 2026 年 2 月 4 日和 2025 年 7 月 23 日结束支持。<sup>[7](https://endoflife.date/argo-workflows)</sup>

近期的 4.x 点版本主要集中于控制器正确性和依赖安全性。v4.1.3 的变更日志列出的修复包括：对空端点禁用 OTLP 导出器、在设置了 `OTEL_SERVICE_NAME` 时予以遵循、在守护进程 Pod 拆除后的事件中保留 `NodeSucceeded`，以及对 `golang.org/x/crypto` 和 `google.golang.org/grpc` 的安全更新。<sup>[11](https://github.com/argoproj/argo-workflows/blob/main/CHANGELOG.md)</sup> v4.1.0 的候选版本增加了对 DRA 资源申领的原生支持，并从 informer 缓存中剥离了 `managedFields`。<sup>[11](https://github.com/argoproj/argo-workflows/blob/main/CHANGELOG.md)</sup>

## 用例

该项目将 Argo Workflows 定位为用于在 Kubernetes 上以更短时间运行机器学习或数据处理等计算密集型作业的工具，也适用于在 Kubernetes 上原生运行 CI/CD 流水线，而无需配置复杂的软件开发产品。其文档还将数据处理、基础设施自动化和流处理列为用例。<sup>[1](https://argoproj.github.io/workflows/)</sup> 2022 年 Gradient Flow 对具备成熟 DataOps 实践的公司所做的一项调查中，Argo Workflows（在该调查中被称为 Kubernetes 原生框架）位列第三受欢迎的工作流编排选项。<sup>[12](https://gradientflow.com/wp-content/uploads/2021/11/Gradient-Flow-Report-2022-State-of-Data-Engineering.pdf)</sup> 在 Salesforce，该工具已被用于配置附加组件，并在 KubeCon NA 2022 上做了展示，重点介绍了分阶段执行和不可变工作流。<sup>[13](https://static.sched.com/hosted_files/kccncna2022/43/How%20Salesforce%20is%20using%20Argo%20Workflows%20for%20provisioning%20add-ons.pdf)</sup> 与 Tekton 的比较将 Argo Workflows 定位为面向机器学习工作流、数据处理和批处理工作的容器原生引擎。<sup>[14](https://ijcttjournal.org/2025/Volume-73/Issue-5/IJCTT-V73I5P119.pdf)</sup>

## References

1. [Argo Workflows | Argo project website](https://argoproj.github.io/workflows/)
2. [Argo | CNCF](https://www.cncf.io/projects/argo/)
3. [Argo Workflows documentation](https://argo-workflows.readthedocs.io/en/latest/)
4. [Architecture - Argo Workflows documentation](https://argoproj.github.io/argo-workflows/architecture/)
5. [The Cloud Native Computing Foundation Announces Argo has Graduated](https://www.cncf.io/announcements/2022/12/06/the-cloud-native-computing-foundation-announces-argo-has-graduated/)
6. [Releases · argoproj/argo-workflows · GitHub](https://github.com/argoproj/argo-workflows/releases/)
7. [Argo Workflows | endoflife.date](https://endoflife.date/argo-workflows)
8. [argoproj/argo-workflows on GitHub](https://github.com/argoproj/argo-workflows)
9. [The Structure of Workflow Specs - Argo Workflows documentation](https://argoproj.github.io/argo-workflows/walk-through/the-structure-of-workflow-specs/)
10. [DAG - Argo Workflows documentation](https://argoproj.github.io/argo-workflows/walk-through/dag/)
11. [argo-workflows CHANGELOG.md](https://github.com/argoproj/argo-workflows/blob/main/CHANGELOG.md)
12. [Gradient Flow Report 2022: State of Data Engineering](https://gradientflow.com/wp-content/uploads/2021/11/Gradient-Flow-Report-2022-State-of-Data-Engineering.pdf)
13. [How Salesforce is using Argo Workflows for provisioning add-ons (KubeCon NA 2022)](https://static.sched.com/hosted_files/kccncna2022/43/How%20Salesforce%20is%20using%20Argo%20Workflows%20for%20provisioning%20add-ons.pdf)
14. [Evolution of CI/CD in Cloud-Native Development, IJCTT](https://ijcttjournal.org/2025/Volume-73/Issue-5/IJCTT-V73I5P119.pdf)
15. [github.com](https://github.com/argoproj/argo-workflows/blob/main/docs/scaling.md)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Cloud, virtualization, and containers › CI/CD and deployment tools

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/argo-workflows

English original: https://www.edgepedia.org/argo-workflows
