Welcome to the Linux Foundation Forum!

4.3 lab needs service account.

4.3 wouldn't work until I made a service account it failed with

✖ python-app python-app child 'python-app-3831382643' failed
└───⚠ build build python-app-build-3831382643 1m wait: Error (exit code 64): workflowtaskresults.argoproj.io is forbidden: User "system:serviceaccount:argo-workflows:default" cannot create resource "workflowtaskresults" in API group "argoproj.io" in the namespace "argo-workflows"

which leads me to believe it needed a service account.
sa.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
  name: argo-workflow-executor
  namespace: argo-workflows
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: argo-workflow-executor-role
  namespace: argo-workflows
rules:
- apiGroups:
  - argoproj.io
  resources:
  - workflowtaskresults
  verbs:
  - create
  - patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: argo-workflow-executor-binding
  namespace: argo-workflows
subjects:
- kind: ServiceAccount
  name: argo-workflow-executor
  namespace: argo-workflows
roleRef:
  kind: Role
  name: argo-workflow-executor-role
  apiGroup: rbac.authorization.k8s.io

kubectl create -f sa.yaml

just add service account to workflow-ci.yaml

spec:
  entrypoint: python-app
  serviceAccountName: argo-workflow-executor
  templates:

and should compile without the error.
Hope this helps

Categories

Upcoming Training