001-workflow-acount.yaml 929 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. apiVersion: v1
  2. kind: ServiceAccount
  3. metadata:
  4. name: workflow
  5. namespace: argo-events
  6. ---
  7. apiVersion: rbac.authorization.k8s.io/v1
  8. kind: Role
  9. metadata:
  10. name: workflow-role
  11. namespace: argo-events
  12. rules:
  13. # pod get/watch is used to identify the container IDs of the current pod
  14. # pod patch is used to annotate the step's outputs back to controller (e.g. artifact location)
  15. - apiGroups:
  16. - ""
  17. resources:
  18. - pods
  19. verbs:
  20. - get
  21. - watch
  22. - patch
  23. # logs get/watch are used to get the pods logs for script outputs, and for log archival
  24. - apiGroups:
  25. - ""
  26. resources:
  27. - pods/log
  28. verbs:
  29. - get
  30. - watch
  31. ---
  32. apiVersion: rbac.authorization.k8s.io/v1
  33. kind: RoleBinding
  34. metadata:
  35. name: workflow-binding
  36. namespace: argo-events
  37. roleRef:
  38. apiGroup: rbac.authorization.k8s.io
  39. kind: Role
  40. name: workflow-role
  41. subjects:
  42. - kind: ServiceAccount
  43. name: workflow