Failed to get value by key: key metadata.namespace does not exist to in the event object #2114
milank78git
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to replace in test.yaml namespace from EventSource webhook .
I added a parameter to Sensor but if the call curl -d '{"namespace":"test"}' -H "Content-Type: application/json" -X POST https://localhost/example ends on error in Sensor POD
"Failed to get value by key: key metadata.namespace does not exist to in the event object"
My sensor is
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: webhook2
spec:
template:
container:
volumeMounts:
- mountPath: /git/argoproj
name: argoproj
- mountPath: /git/argoproj1
name: argoproj1
volumes:
- name: argoproj
emptyDir: {}
- name: argoproj1
emptyDir: {}
serviceAccountName: operate-workflow-sa
dependencies:
- name: test-dep
eventSourceName: webhook
eventName: git
triggers:
- template:
name: workflow-trigger-1
k8s:
operation: update
parameters:
- src:
dependencyName: test-dep
dataKey: namespace
value: default
dest: metadata.namespace
source:
git:
url: "https://github.com//deployment-test.git"
cloneDirectory: "/git/argoproj"
creds:
username:
name: github-secret
key: username
password:
name: github-secret
key: password
filePath: "argocd/test.yaml"
branch: "develop"
My My webhook EventSource is default
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: webhook
spec:
service:
ports:
- port: 12000
targetPort: 12000
webhook:
# event-source can run multiple HTTP servers. Simply define a unique port to start a new HTTP server
example:
# port to run HTTP server on
port: "12000"
# endpoint to listen to
endpoint: /example
# HTTP request method to allow. In this case, only POST requests are accepted
method: POST
Beta Was this translation helpful? Give feedback.
All reactions