[英]How does an Argo Workflow carry out control flow with Kubernetes?
If desperate, one can consider Argo Workflows as a programming language implemented in YAML and using Kubernetes as a back-end.如果绝望,可以将 Argo Workflows 视为一种在 YAML 中实现并使用 Kubernetes 作为后端的编程语言。
steps:
steps:
when:
when:
withSequence:
and withItems:
withSequence:
和withItems:
The templates map somewhat directly onto Kubernetes YAML specs.模板 map 有点直接指向 Kubernetes YAML 规范。 Parameters appear to be shared via annotations and artifacts are shared via native Kubernetes functionality.
参数似乎通过注释共享,工件通过本机 Kubernetes 功能共享。
How is the flow-control implemented?流量控制是如何实现的? What features of Kubernetes does Argo use to accomplish this?
Argo 使用 Kubernetes 的哪些功能来实现这一点? Does it have something to do with the Kubernetes Control Plane?
它与 Kubernetes 控制平面有关吗?
Argo Workflows is implemented with custom Kubernetes Custom Resources , eg its own yaml manifest types. Argo Workflows 使用自定义Kubernetes 自定义资源实现,例如它自己的 yaml 清单类型。 For every custom resource there is an associated custom pod that acts as a Kubernetes Controller with the logic.
对于每个自定义资源,都有一个关联的自定义 pod,它充当Kubernetes Controller与逻辑。
The custom controller may create other resources or Pods, and watch the result of their execution status in the status-fields and then implement its workflow logics accordingly, eg watch results and follow the declared when:
expressions depending on the results.自定义 controller 可以创建其他资源或 Pod,并在 status-fields 中观察其执行状态的结果,然后相应地实现其工作流逻辑,例如观察结果并遵循声明的
when:
表达式取决于结果。
I have more experience using Tekton Pipelines but it works the same way as Argo Workflows.我有更多使用Tekton Pipelines的经验,但它的工作方式与 Argo Workflows 相同。 If you are interested in implementing similar things, I recommend to start with Kubebuilder and read The Kubebuilder book .
如果您对实现类似的东西感兴趣,我建议您从Kubebuilder开始并阅读The Kubebuilder book 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.