forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(controller): opt-in to sending pod node events as pod (argoproj#…
…6377) * feat(controller): opt-in to sending pod node events as pod Because of how kubernetes aggregates events and how Argo sends both workflow and node events with the same involved object (the workflow), some workflow and node events can get merged into a single event, without specifying which nodes are merged into one. This makes it challenging to respond to phase changes for nodes that have a particular annotation because kubernetes ignores annotations when checking if an event is similar. Creating an opt-in feature to send node events for nodes of type "Pod" with the involved object set to the associated pod will force kubernetes to send an event for each pod instead of aggregated several events into a single event and thus make it possible build a system solely that responds to node phase changes using Argo Workflows and Argo Events. An alternative solution to this would be creating a `WorkflowNode` custom resource and sending events with the workflow node itself as the involved object, but that seemed like a bigger change than necessary. Signed-off-by: Joseph McGovern <[email protected]> * feat(controller): Get pod by node more efficiently Rather than fetching and iterating over all pods, we can fetch the pod we are interested in by a key. Even better, we can use an existing function to do this instead of writing a new implementation. Signed-off-by: Joseph McGovern <[email protected]> * feat(controller): Only send one event for pod nodes When the workflow controller is configured to send events with the `involvedObject` set to the pod for pod workflow nodes, it could either only send the event with the pod as the involved object, or it could send two events: one with the pod and the other as the workflow as the involved object. The design decision was made to only send a single event in order to reduce unnecessary event noise. Users that opt-in to this feature must be aware that pod nodes will no longer emit events with the Workflow as the involved object. Signed-off-by: Joseph McGovern <[email protected]>
- Loading branch information
1 parent
959ce6b
commit cc701a1
Showing
5 changed files
with
162 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters