Can I use sensor to manipulate k8s resources? #3340
Unanswered
rookie-fpc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I setup a configmap sensor:
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: cm-update
spec:
template:
serviceAccountName: argo-events-sa # A service account has privileges to create a Pod
dependencies:
- name: cm-update
eventSourceName: k8s-resource
eventName: smartsales-uat
triggers:
- template:
name: cm-update-1
k8s:
operation: update
source:
configmap:
name: test-app
key: test
want to update confimap when triggered. but I got this error:
{"level":"info","ts":1729739119.4776154,"logger":"argo-events.sensor","caller":"standard-k8s/standard-k8s.go:171","msg":"updating the object...","sensorName":"cm-update","triggerName":"cm-update","triggerType":"Kubernetes"} 2024-10-24T11:05:19.477854186+08:00 {"level":"error","ts":1729739119.47768,"logger":"argo-events.sensor","caller":"sensors/listener.go:379","msg":"Failed to execute a trigger","sensorName":"cm-update","error":"failed to execute trigger, failed to retrieve existing object. err: name is required","triggerName":"cm-update","triggeredBy":["cm-update"],"triggeredByEvents":["31653764663335312d373639382d343333392d386361362d656363356666386366393034"],"stacktrace":"github.com/argoproj/argo-events/sensors.(*SensorContext).triggerWithRateLimit\n\t/home/runner/work/argo-events/argo-events/sensors/listener.go:379\ngit.luolix.top/argoproj/argo-events/sensors.(*SensorContext).triggerActions.func1\n\t/home/runner/work/argo-events/argo-events/sensors/listener.go:360"} 2024-10-24T11:05:19.477863557+08:00 {"level":"error","ts":1729739119.4777017,"logger":"argo-events.sensor","caller":"sensors/listener.go:364","msg":"Failed to execute a trigger","sensorName":"cm-update","error":"failed to execute trigger, failed to retrieve existing object. err: name is required","triggerName":"cm-update","stacktrace":"github.com/argoproj/argo-events/sensors.(*SensorContext).triggerActions.func1\n\t/home/runner/work/argo-events/argo-events/sensors/listener.go:364"}
How can I setup to correct?
thanks
Beta Was this translation helpful? Give feedback.
All reactions