首页 > 解决方案 > 为什么这个 argo 工作流程不运行?

问题描述

我正在尝试配置我的 Argo 工作流程。

我知道如何纠正错误,但如果它们不运行,我该如何调试?

我在 Ubuntu 20.04 上运行 Argo 3.0.10

argo: v3.0.10
  BuildDate: 2021-08-18T23:41:44Z
  GitCommit: 0177e73b962136200517b7f301cd98cfbed02a31
  GitTreeState: clean
  GitTag: v3.0.10
  GoVersion: go1.16.6
  Compiler: gc
  Platform: linux/amd64

我使用以下命令应用以下 YAML

argo 提交 test.yaml --watch:

{
   "apiVersion": "argoproj.io/v1alpha1",
   "kind": "Workflow",
   "metadata": {
      "annotations": {
         "argo": "workflows"
      },
      "generateName": "hello-world-",
      "labels": {
         "workflows.argoproj.io/archive-strategy": "false"
      },
      "namespace": "argo"
   },
   "spec": {
      "entrypoint": "entrypoint",
      "parallelism": 3,
      "podGC": {
         "strategy": "OnWorkflowSuccess"
      },
      "securityContext": {
         "fsGroup": 2000,
         "runAsGroup": 3000,
         "runAsNonRoot": true,
         "runAsUser": 1000
      },
      "serviceAccountName": "argouser",
      "templates": [
         {
            "container": {
               "args": [
                  "hello world"
               ],
               "command": [
                  "cowsay"
               ],
               "image": "docker/whalesay:latest",
               "resources": {
                  "limits": {
                     "cpu": "100m",
                     "memory": "32Mi"
                  }
               }
            },
            "name": "entrypoint"
         }
      ],
      "ttlStrategy": {
         "secondsAfterSuccess": 5
      }
   }
}

据我所知,从未创建过 Pod,也没有记录它们,但是,工作流是存在的。这是工作流的 kubectl describe 输出:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  annotations:
    argo: workflows
  creationTimestamp: "2021-09-07T20:48:37Z"
  generateName: hello-world-
  generation: 1
  labels:
    workflows.argoproj.io/archive-strategy: "false"
  name: hello-world-p6h4k
  namespace: argo
  resourceVersion: "14801149"
  uid: ee28ae8d-970e-47c6-83ee-fcdc6db44c39
spec:
  arguments: {}
  entrypoint: entrypoint
  parallelism: 3
  podGC:
    strategy: OnWorkflowSuccess
  securityContext:
    fsGroup: 2000
    runAsGroup: 3000
    runAsNonRoot: true
    runAsUser: 1000
  serviceAccountName: argouser
  templates:
  - container:
      args:
      - hello world
      command:
      - cowsay
      image: docker/whalesay:latest
      name: ""
      resources:
        limits:
          cpu: 100m
          memory: 32Mi
    inputs: {}
    metadata: {}
    name: entrypoint
    outputs: {}
  ttlStrategy:
    secondsAfterSuccess: 5
status:
  finishedAt: null
  startedAt: null

并且“错误”消息是:

Name:                hello-world-p6h4k
Namespace:           argo
ServiceAccount:      argouser
Status:              Pending
Created:             Tue Sep 07 20:48:37 +0000 (now)
Progress:
FATA[2021-09-07T20:48:37.186Z] workflows.argoproj.io "hello-world-p6h4k" not found

标签: argo-workflows

解决方案


感谢@Michael Crenshaw 的提示!

我查看了工作流控制器日志,工作流确实运行成功,但没有输出任何 argo 日志,工作流仍列为待处理。我仍在寻找正确的配置,所以我不确定这些消息是如何不一致的。如果我找到答案,我会在这里发布。


推荐阅读