Parametraization of URL of http trigger based on kafka source #2601
Closed
gyanprakash48
started this conversation in
General
Replies: 1 comment 1 reply
-
I found the solution |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to parametrised url like below , but its not working . Can some one help how to achieve this ?
http://10.1.63.246/api/v1/organizations/{{dataKey.body.organization}}/job/{{dataKey.body.payload.job_id}}/dispatch
=== Complete Yaml======
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: kafka
spec:
template:
container:
env:
- name: DEBUG_LOG
value: "true"
serviceAccountName: argo-events-sa
dependencies:
- name: kafka-dep
eventSourceName: kafka
eventName: recompute
triggers:
- template:
name: http-trigger
http:
url: http://10.1.63.246/api/v1/organizations/{{dataKey.body.organization}}/job/{{dataKey.body.payload.job_id}}/dispatch
payload:
- src:
dependencyName: kafka-dep
dataKey: body.payload.parameters
useRawData: true
dest: 'parameters'
- src:
dependencyName: kafka-dep
dataKey: body.payload.playlist_files
useRawData: true
dest: playlist_files
method: POST
headers:
Content-Type: application/json
accept: application/json
retryStrategy:
steps: 3
duration: 3s
policy:
status:
allow:
- 200
- 201
Beta Was this translation helpful? Give feedback.
All reactions