Closed Gio-R closed 4 months ago
At present, if an EventListeners has Triggers inside its own spec as well as namespace-selector, Triggers in spec as well as in selected namespaces will be processed for a request. Triggers inside EventListener spec when using namespace-selector mode is deprecated and ability to specify both will be removed.
That explains why adding the spec.namespaceSelector
makes the Trigger run two times, but it doesn't explain why without that selector the Trigger is never run. At the moment, as a workaround, I have triggerGroups
select the Triggers I want to run, spec.namespaceSelector
select all namespaces and spec.labelSelector
select no Triggers (to avoid double runs). Without the spec.namespaceSelector
no Trigger is run, even if correctly selected by the triggerGroup.
I reached same issue. Without spec.namespaceSelector, the triggers seleted by spec.triggerGroup never run. Finally I have the spec.namespaceSelector to match a non-exist namesapce, then the triggerGroup ran as expected(once). for exsample:
spec:
namespaceSelector:
matchNames:
- not-exists
Through the document mentioned by @khrm , and explained by @Gio-R , triggers in spec as well as in selected namespaces will be processed for a request which is the expected behavior. The issue is that without the spec.namespaceSelector, no triggers will be processed.
Sorry, I was busy with other components. This looks like a bug. Hopefully, I will fix this by v0.26.0 unless someone else want to pick this up.
/cc @cugykw
This problem seems to be that spec.namespaceSelector is not set, and the is-multi-ns
parameter is set to false, causing el
to only listen to the triggers in the namespace where el is located. Triggers in other namespaces will not be triggered. It may be the same problem as the issue #1652 .
Expected Behavior
With the following EventListener I expect the selected Triggers to be called:
Actual Behavior
The selected Triggers are not called and adding the following
spec.namespaceSelector
section to the above EventListener causes the Trigger to be called two times instead of the expected one:Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Tekton Pipeline version: v0.47.0
Tekton Triggers version: v0.24.0