Created
November 19, 2021 10:47
-
-
Save Siebjee/6a666883cefbcff2a091af5a74861eb0 to your computer and use it in GitHub Desktop.
argo-events/issue-1025
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
apiVersion: argoproj.io/v1alpha1 | |
kind: EventBus | |
metadata: | |
name: default | |
namespace: default | |
spec: | |
nats: | |
native: | |
replicas: 3 | |
auth: token | |
containerTemplate: | |
resources: | |
requests: | |
cpu: "10m" | |
metricsContainerTemplate: | |
resources: | |
requests: | |
cpu: "10m" | |
antiAffinity: false |
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
apiVersion: argoproj.io/v1alpha1 | |
kind: EventSource | |
metadata: | |
name: my-es | |
namespace: default | |
spec: | |
template: | |
serviceAccountName: argo-events-sa | |
resource: | |
configmap: | |
namespace: default | |
group: "" | |
version: v1 | |
resource: configmaps | |
eventTypes: | |
- ADD | |
- UPDATE | |
filter: | |
afterStart: true | |
fields: | |
- key: metadata.name | |
operation: == | |
value: scripts |
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
apiVersion: argoproj.io/v1alpha1 | |
kind: Sensor | |
metadata: | |
name: my-sensor | |
namespace: default | |
spec: | |
template: | |
serviceAccountName: argo-events-sa | |
activeDeadlineSeconds: "7200" | |
podGC: | |
strategy: OnWorkflowSuccess | |
triggers: | |
- template: | |
name: batchjob-workflow-trigger | |
k8s: | |
version: v1alpha1 | |
group: argoproj.io | |
operation: create | |
resource: workflows | |
source: | |
resource: | |
apiVersion: argoproj.io/v1alpha1 | |
kind: Workflow | |
metadata: | |
generateName: my-wf- | |
namespace: default | |
spec: | |
entrypoint: workflow | |
serviceAccountName: argo | |
templates: | |
- name: workflow | |
dag: | |
tasks: | |
- name: A | |
templateRef: | |
name: workflow-template-whalesay | |
template: whalesay | |
- name: B | |
depends: "A" | |
templateRef: | |
name: workflow-template-fail | |
template: intentional-fail | |
- name: C | |
depends: "A" | |
templateRef: | |
name: workflow-template-whalesay | |
template: whalesay | |
- name: D | |
depends: "B.Failed && C" | |
templateRef: | |
name: workflow-template-whalesay | |
template: whalesay | |
- name: E | |
depends: "A" | |
templateRef: | |
name: workflow-template-fail | |
template: intentional-fail | |
- name: F | |
depends: "A" | |
templateRef: | |
name: workflow-template-whalesay | |
template: whalesay | |
- name: G | |
depends: "E && F" | |
templateRef: | |
name: workflow-template-whalesay | |
template: whalesay |
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
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: default-argo-events-role | |
namespace: default | |
rules: | |
- apiGroups: | |
- argoproj.io | |
resources: | |
- workflows | |
- workflows/finalizers | |
- workflowtemplates | |
- workflowtemplates/finalizers | |
- cronworkflows | |
- cronworkflows/finalizers | |
- clusterworkflowtemplates | |
- clusterworkflowtemplates/finalizers | |
- sensors | |
- sensors/finalizers | |
- sensors/status | |
- eventsources | |
- eventsources/finalizers | |
- eventsources/status | |
- eventbus | |
- eventbus/finalizers | |
- eventbus/status | |
verbs: | |
- create | |
- delete | |
- deletecollection | |
- get | |
- list | |
- patch | |
- update | |
- watch | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
- pods/exec | |
- configmaps | |
- secrets | |
- services | |
- events | |
- persistentvolumeclaims | |
verbs: | |
- create | |
- get | |
- list | |
- watch | |
- update | |
- patch | |
- delete | |
- apiGroups: | |
- batch | |
resources: | |
- jobs | |
verbs: | |
- create | |
- get | |
- list | |
- watch | |
- update | |
- patch | |
- delete | |
- apiGroups: | |
- apps | |
resources: | |
- deployments | |
- statefulsets | |
verbs: | |
- create | |
- get | |
- list | |
- watch | |
- update | |
- patch | |
- delete | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: default-argo-role | |
namespace: default | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
- pods/exec | |
verbs: | |
- create | |
- get | |
- list | |
- watch | |
- update | |
- patch | |
- delete | |
- apiGroups: | |
- "" | |
resources: | |
- configmaps | |
verbs: | |
- get | |
- watch | |
- list | |
- patch | |
- apiGroups: | |
- "" | |
resources: | |
- persistentvolumeclaims | |
verbs: | |
- create | |
- delete | |
- get | |
- apiGroups: | |
- argoproj.io | |
resources: | |
- workflows | |
- workflows/finalizers | |
verbs: | |
- get | |
- list | |
- watch | |
- update | |
- patch | |
- delete | |
- create | |
- apiGroups: | |
- argoproj.io | |
resources: | |
- workflowtemplates | |
- workflowtemplates/finalizers | |
- clusterworkflowtemplates | |
- clusterworkflowtemplates/finalizers | |
verbs: | |
- get | |
- list | |
- watch | |
- apiGroups: | |
- "" | |
resources: | |
- serviceaccounts | |
verbs: | |
- get | |
- list | |
- apiGroups: | |
- argoproj.io | |
resources: | |
- cronworkflows | |
- cronworkflows/finalizers | |
verbs: | |
- get | |
- list | |
- watch | |
- update | |
- patch | |
- delete | |
- apiGroups: | |
- "" | |
resources: | |
- events | |
verbs: | |
- create | |
- patch | |
- apiGroups: | |
- policy | |
resources: | |
- poddisruptionbudgets | |
verbs: | |
- create | |
- get | |
- delete | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: argo | |
namespace: default | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: argo-events-sa | |
namespace: default | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: default-argo-binding | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: default-argo-role | |
subjects: | |
- kind: ServiceAccount | |
name: argo | |
namespace: default | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: default-argo-events-binding | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: default-argo-events-role | |
subjects: | |
- kind: ServiceAccount | |
name: argo-events-sa | |
namespace: default |
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
apiVersion: argoproj.io/v1alpha1 | |
kind: WorkflowTemplate | |
metadata: | |
name: workflow-template-whalesay | |
namespace: default | |
spec: | |
entrypoint: whalesay | |
templates: | |
- name: whalesay | |
container: | |
image: docker/whalesay:latest | |
command: [cowsay] | |
args: ["hello world"] | |
--- | |
apiVersion: argoproj.io/v1alpha1 | |
kind: WorkflowTemplate | |
metadata: | |
name: workflow-template-fail | |
namespace: default | |
spec: | |
entrypoint: intentional-fail | |
templates: | |
- name: intentional-fail | |
container: | |
image: alpine:latest | |
command: [sh, -c] | |
args: ["echo intentional failure; exit 1"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment