无法更新或删除现有的Argo事件传感器和EventSource。

huangapple go评论58阅读模式
英文:

Unable to update or delete existing argo events sensor and EventSource

问题

遇到问题,尝试修改或删除现有的 argo 事件传感器。

尝试修改传感器

  • 我尝试对现有的传感器进行更改。
  • 但新更改没有生效。当触发它时,它仍在使用旧触发器。

尝试删除传感器

  • 无法删除。kubectl delete 永远挂起。唯一的方法是删除整个命名空间。

使用:

  • Argo 事件版本 - v1.7.5
  • Kubernetes - v1.24.4+k3s1(在本地 - 使用 K3d 的 Docker-Desktop 进行测试)

由于在生产环境中删除一切并重新操作不是一个选项,我想知道这是否是 argo 事件的已知问题,或者我是否做错了什么。

英文:

Experiencing issue while modifying or deleting an existing argo events sensor.

Tried to modify a sensor

  • I tried to apply changes to an existing sensor.
  • But new changes are not taking effect. When it gets triggered, it is still using old triggers.

Tried to delete a sensor

  • Unable to delete. kubectl delete hangs forever. Only way is to delete whole namespace.

Using :

  • Argo-events version - v1.7.5
  • Kubernetes - v1.24.4+k3s1 ( testing in local - docker-desktop with K3d )

Since deleting everything & redoing is not an option when working in production environment, like to know if it's a known issue with argo-events or if I am doing something wrong.

答案1

得分: 1

截至v1.7.5版本,default sensor和eventSource kubernetes资源yaml值中存在一个bug。

apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
.....
  finalizers:
  - sensor-controller
.....
  • 它的finalizers为 sensor-controller
  • 在v1.7.0+版本中,argo events团队已经将sensor controller和source controller合并到argo-events-controller-manager中。
  • 我认为事件传感器和事件源指向了错误的控制器。
  • 它应该理想地指向argo-events-controller

要解决这个问题,直到在argo-events kubernetes图表中修复此bug:

更新您的sensor和event source定义,将finalizers设置为空数组。

# 带有空finalizers的示例sensor
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: minio
  finalizers: []  # <-- 就是这里
spec:
  dependencies:
    - name: test-dep
      eventSourceName: minio
      eventName: example
  triggers:
    - template:
        name: http-trigger
        http:
          url: http://http-server.argo-events.svc:8090/hello
          payload:
            - src:
                dependencyName: test-dep
                dataKey: notification.0.s3.bucket.name
              dest: bucket
            - src:
                dependencyName: test-dep
                contextKey: type
              dest: type
          method: POST
      retryStrategy:
        steps: 3
        duration: 3s
英文:

As of release v1.7.5, there is a bug in default sensor & eventSource kubernetes resource yaml values.

apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
....
  finalizers:
  - sensor-controller
....
  • It has finalizers as sensor-controller.
  • In v1.7.0+, argo events team has merged sensor controller & source controller into argo-events-controller-manager.
  • I believe, event sensor and event source are pointing to wrong controller
  • It should ideally be pointing to argo-events-controller

To resolve this issue till this bug is fixed in argo-events kubernetes charts:

Update your sensor & event source definitions to have finalizers as empty array.

# example sensor with empty finalizers
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: minio
  finalizers: []  # &lt;-- this one
spec:
  dependencies:
    - name: test-dep
      eventSourceName: minio
      eventName: example
  triggers:
    - template:
        name: http-trigger
        http:
          url: http://http-server.argo-events.svc:8090/hello
          payload:
            - src:
                dependencyName: test-dep
                dataKey: notification.0.s3.bucket.name
              dest: bucket
            - src:
                dependencyName: test-dep
                contextKey: type
              dest: type
          method: POST
      retryStrategy:
        steps: 3
        duration: 3s

huangapple
  • 本文由 发表于 2023年2月14日 20:58:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/75448185.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定