-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boolean circuit for event dependencies (#162)
* Moving EventProtocol to api common * Moving EventProtocol to api common * Added support to declare dependency groups and circuit expression * AAdded DependencyGroups as separate entity from Dependencies * Validating every sensor file and other chores * Added conditions for triggers * Validating every sensor file and other chores
- Loading branch information
1 parent
6d3d3ae
commit 8989738
Showing
26 changed files
with
1,366 additions
and
1,379 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# The dependency grouping and selective workflow trigger execution is not supported in latest release | ||
# This feature will be released in next release v0.8. | ||
# You can try this example with sensor and sensor controller image v0.7.1 | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Sensor | ||
metadata: | ||
name: webhook-sensor-http | ||
labels: | ||
sensors.argoproj.io/sensor-controller-instanceid: argo-events | ||
spec: | ||
deploySpec: | ||
containers: | ||
- name: "sensor" | ||
image: "argoproj/sensor:v0.7.1" | ||
imagePullPolicy: Always | ||
serviceAccountName: argo-events-sa | ||
dependencies: | ||
- name: "webhook-gateway-http:endpoint1" | ||
filters: | ||
context: | ||
source: | ||
host: xyz.com | ||
contentType: application/json | ||
- name: "webhook-gateway-http:endpoint2" | ||
- name: "webhook-gateway-http:endpoint3" | ||
- name: "webhook-gateway-http:endpoint4" | ||
- name: "webhook-gateway-http:endpoint5" | ||
- name: "webhook-gateway-http:endpoint6" | ||
- name: "webhook-gateway-http:endpoint7" | ||
filters: | ||
name: "data-filter" | ||
data: | ||
dataFilters: | ||
- path: bucket | ||
type: string | ||
value: argo-workflow-input | ||
- name: "webhook-gateway-http:endpoint8" | ||
- name: "webhook-gateway-http:endpoint9" | ||
dependencyGroups: | ||
- name: "group_1" | ||
dependencies: | ||
- "webhook-gateway-http:endpoint1" | ||
- "webhook-gateway-http:endpoint2" | ||
- name: "group_2" | ||
dependencies: | ||
- "webhook-gateway-http:endpoint3" | ||
- name: "group_3" | ||
dependencies: | ||
- "webhook-gateway-http:endpoint4" | ||
- "webhook-gateway-http:endpoint5" | ||
- name: "group_4" | ||
dependencies: | ||
- "webhook-gateway-http:endpoint6" | ||
- "webhook-gateway-http:endpoint7" | ||
- "webhook-gateway-http:endpoint8" | ||
- name: "group_5" | ||
dependencies: | ||
- "webhook-gateway-http:endpoint9" | ||
circuit: "group_1 || group_2 || ((group_3 || group_4) && group_5)" | ||
eventProtocol: | ||
type: "HTTP" | ||
http: | ||
port: "9300" | ||
triggers: | ||
- name: webhook-workflow-trigger | ||
when: | ||
any: | ||
- "group_1" | ||
- "group_2" | ||
resource: | ||
namespace: argo-events | ||
group: argoproj.io | ||
version: v1alpha1 | ||
kind: Workflow | ||
source: | ||
inline: | | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: hello-world- | ||
spec: | ||
entrypoint: whalesay | ||
templates: | ||
- name: whalesay | ||
container: | ||
args: | ||
- "hello world" | ||
command: | ||
- cowsay | ||
image: "docker/whalesay:latest" | ||
- name: webhook-workflow-trigger-2 | ||
when: | ||
all: | ||
- "group_5" | ||
- "group_4" | ||
resource: | ||
namespace: argo-events | ||
group: argoproj.io | ||
version: v1alpha1 | ||
kind: Workflow | ||
source: | ||
inline: | | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: hello-world-2- | ||
spec: | ||
entrypoint: whalesay | ||
templates: | ||
- name: whalesay | ||
container: | ||
args: | ||
- "hello world" | ||
command: | ||
- cowsay | ||
image: "docker/whalesay:latest" | ||
- name: webhook-workflow-trigger-common | ||
resource: | ||
namespace: argo-events | ||
group: argoproj.io | ||
version: v1alpha1 | ||
kind: Workflow | ||
source: | ||
inline: | | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: hello-world-common- | ||
spec: | ||
entrypoint: whalesay | ||
templates: | ||
- name: whalesay | ||
container: | ||
args: | ||
- "hello world" | ||
command: | ||
- cowsay | ||
image: "docker/whalesay:latest" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ spec: | |
- "hello world" | ||
command: | ||
- cowsay | ||
image: "docker/whalesay:latest" | ||
image: "docker/whalesay:latest" |
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
Oops, something went wrong.