Compare commits
2 Commits
239df0af11
...
c9ffa1c420
Author | SHA1 | Date | |
---|---|---|---|
c9ffa1c420 | |||
c99b2be62f |
@ -52,7 +52,7 @@ spec:
|
|||||||
- name: REPO_URL
|
- name: REPO_URL
|
||||||
value: https://gitea.marcin00.pl/pikram/user-microservice.git
|
value: https://gitea.marcin00.pl/pikram/user-microservice.git
|
||||||
- name: REPO_BRANCH
|
- name: REPO_BRANCH
|
||||||
value: dev
|
value: argo-workflows
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
git clone --depth 1 --branch "${REPO_BRANCH}" --single-branch "${REPO_URL}" repo
|
git clone --depth 1 --branch "${REPO_BRANCH}" --single-branch "${REPO_URL}" repo
|
||||||
|
13
argo-workflows/eventbus-default.yaml
Normal file
13
argo-workflows/eventbus-default.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: EventBus
|
||||||
|
metadata:
|
||||||
|
name: default
|
||||||
|
namespace: argo-events
|
||||||
|
spec:
|
||||||
|
nats:
|
||||||
|
native:
|
||||||
|
# Optional, defaults to 3.
|
||||||
|
# If it is < 3, set it to 3, that is the minimal requirement.
|
||||||
|
replicas: 3
|
||||||
|
# Optional, authen strategy, "none" or "token", defaults to "none"
|
||||||
|
auth: token
|
38
argo-workflows/permissions.yaml
Normal file
38
argo-workflows/permissions.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: operate-workflow-sa
|
||||||
|
namespace: argo-events
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: operate-workflow-role
|
||||||
|
namespace: argo-events
|
||||||
|
rules:
|
||||||
|
- apiGroups: [ "argoproj.io" ]
|
||||||
|
resources: [ "workflows" ]
|
||||||
|
verbs: [ "*" ]
|
||||||
|
- apiGroups: [ "argoproj.io" ]
|
||||||
|
resources: [ "workflowtaskresults" ]
|
||||||
|
verbs: [ "create", "patch" ]
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "pods" ]
|
||||||
|
verbs: [ "get", "patch" ]
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: operate-workflow-role-binding
|
||||||
|
namespace: argo-events
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: operate-workflow-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: operate-workflow-sa
|
||||||
|
namespace: argo-events
|
42
argo-workflows/sensor.yaml
Normal file
42
argo-workflows/sensor.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Sensor
|
||||||
|
metadata:
|
||||||
|
name: sensor
|
||||||
|
namespace: argo-events
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
serviceAccountName: operate-workflow-sa
|
||||||
|
dependencies:
|
||||||
|
- name: dep
|
||||||
|
eventSourceName: webhook
|
||||||
|
eventName: test-hook
|
||||||
|
triggers:
|
||||||
|
- template:
|
||||||
|
name: trigger
|
||||||
|
k8s:
|
||||||
|
operation: create
|
||||||
|
source:
|
||||||
|
resource:
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Workflow
|
||||||
|
metadata:
|
||||||
|
generateName: test-workflow-
|
||||||
|
spec:
|
||||||
|
serviceAccountName: operate-workflow-sa
|
||||||
|
entrypoint: entry-wf
|
||||||
|
templates:
|
||||||
|
- name: entry-wf
|
||||||
|
container:
|
||||||
|
image: docker/whalesay
|
||||||
|
command: [cowsay]
|
||||||
|
args: ["{{ workflow.parameters.argName }}"]
|
||||||
|
arguments:
|
||||||
|
parameters:
|
||||||
|
- name: argName
|
||||||
|
value: "Default_argName"
|
||||||
|
parameters:
|
||||||
|
- src:
|
||||||
|
dependencyName: dep
|
||||||
|
dataKey: body.argName
|
||||||
|
dest: spec.arguments.parameters.0.value
|
15
argo-workflows/source.yaml
Normal file
15
argo-workflows/source.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: EventSource
|
||||||
|
metadata:
|
||||||
|
name: webhook
|
||||||
|
namespace: argo-events
|
||||||
|
spec:
|
||||||
|
service:
|
||||||
|
ports:
|
||||||
|
- port: 12000
|
||||||
|
targetPort: 12000
|
||||||
|
webhook:
|
||||||
|
test-hook:
|
||||||
|
endpoint: /example
|
||||||
|
method: POST
|
||||||
|
port: "12000"
|
Reference in New Issue
Block a user