AMQP - Argo-events: argo-workflow not triggered



我正在尝试运行一个由事件源触发的argo工作流,该事件源侦听RabbitMQ上发布的消息。我在这里遵循了确切的步骤:AMQP-Argo Events

RabbitMQ控制器pod正在运行:

eventbus-controller-7b5bd8b7fd-nggrc      1/1     Running   0          4h24m
events-webhook-6d4dc5b476-fnf6x           1/1     Running   0          4h24m
eventsource-controller-57b6cff5c8-xhfwd   1/1     Running   0          4h24m
rabbitmq-controller-949wp                 1/1     Running   0          178m
sensor-controller-6f5b54468-8ndft         1/1     Running   0          4h24m

当我在交换测试上发布消息时使用:

import pika
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.basic_publish(exchange='test',
routing_key='hello',
body='{"message": "hello"}')

并使用

登录到pod
kubectl logs pod/<RABBITMQ-CONTROLLER-POD> -n argo-events

2021-09-01 22:58:56.437190+00:00 [info] <0.3934.0> accepting AMQP connection <0.3934.0> (127.0.0.1:58396 -> 127.0.0.1:5672)
2021-09-01 22:58:56.442906+00:00 [info] <0.3934.0> connection <0.3934.0> (127.0.0.1:58396 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/'

然而,当我使用

查看工作流时,我没有看到任何列出的工作流。
argo list -n argo-events

所以看起来传感器没有被触发。有人能告诉我哪里做错了吗?

谢谢!

我只能建议(作为仍在从事基本开发实现的人)检查模板/示例文件是否设置了适当的凭据和服务帐户-当我无法获得资源触发器工作时,我同样感到困惑。

编辑:您还应该验证传感器有一个适当的服务帐户(参见https://argoproj.github.io/argo-events/service-accounts/),例如
apiVersion: v1
kind: ServiceAccount
metadata:
name: operate-workflow-sa
---
# Similarly you can use a ClusterRole and ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: operate-workflow-role
rules:
- apiGroups:
- argoproj.io
verbs:
- "*"
resources:
- workflows
- workflowtemplates
- cronworkflows
- clusterworkflowtemplates
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: operate-workflow-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: operate-workflow-role
subjects:
- kind: ServiceAccount
name: operate-workflow-sa

来源:https://argoproj.github.io/argo-events/quick_start/

相关内容

  • 没有找到相关文章

最新更新