Skip to content

Commit

Permalink
Change event names
Browse files Browse the repository at this point in the history
  • Loading branch information
aliok committed Oct 5, 2023
1 parent f31e0d2 commit 7e5c4f9
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
broker: analytics-broker
filter:
attributes:
type: com.knative.dev.feedback.event
type: eventmesh.ai-demo.feedback
subscriber:
ref:
apiVersion: serving.knative.dev/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
broker: predictions-broker
filter:
attributes:
type: com.knative.dev.prediction.event
type: eventmesh.ai-demo.prediction
subscriber:
ref:
apiVersion: serving.knative.dev/v1
Expand Down
2 changes: 1 addition & 1 deletion infra/openshift-manifests/prediction-service/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
broker: predictions-broker
filter:
attributes:
type: com.knative.dev.minio.event
type: eventmesh.ai-demo.storage
subscriber:
ref:
apiVersion: serving.knative.dev/v1
Expand Down
4 changes: 2 additions & 2 deletions infra/openshift-manifests/reply-service/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
broker: predictions-broker
filter:
attributes:
type: com.knative.dev.prediction.event
type: eventmesh.ai-demo.prediction
subscriber:
ref:
apiVersion: v1
Expand All @@ -23,7 +23,7 @@ spec:
broker: predictions-broker
filter:
attributes:
type: com.knative.dev.prediction.event
type: eventmesh.ai-demo.prediction
subscriber:
ref:
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion services/feedback-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ and these headers:
connection: close
content-length: 180
ce-time: 2023-09-26T11:29:10.252868+00:00
ce-type: com.knative.dev.feedback.event
ce-type: eventmesh.ai-demo.feedback
ce-source: feedback-service
ce-id: 2ea7f9e1-2ca7-4984-bfb5-d4c1064d12da
ce-specversion: 1.0
Expand Down
2 changes: 1 addition & 1 deletion services/feedback-service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def receive_feedback():
}

ce_attributes = {
"type": "com.knative.dev.feedback.event",
"type": "eventmesh.ai-demo.feedback",
"source": SOURCE_DECLARATION,
}
event = CloudEvent(ce_attributes, ce_data)
Expand Down
2 changes: 1 addition & 1 deletion services/minio-webhook-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ and these headers:
connection: close
content-length: 180
ce-time: 2023-09-26T11:29:10.252868+00:00
ce-type: com.knative.dev.minio.event
ce-type: eventmesh.ai-demo.storage
ce-source: pod.my-namespace.my-pod
ce-id: 2ea7f9e1-2ca7-4984-bfb5-d4c1064d12da
ce-specversion: 1.0
Expand Down
2 changes: 1 addition & 1 deletion services/minio-webhook-source/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def receive_event():
}

ce_attributes = {
"type": "com.knative.dev.minio.event",
"type": "eventmesh.ai-demo.storage",
"source": SOURCE_DECLARATION,
}
event = CloudEvent(ce_attributes, ce_data)
Expand Down
8 changes: 4 additions & 4 deletions services/prediction-service/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Prediction service

This service:
- Receives a `com.knative.dev.minio.event` event
- Receives a `eventmesh.ai-demo.storage` event
- Downloads the image from Minio
- Sends the image to the KServe inference service
- Replies with the prediction result as a `com.knative.dev.prediction.event` event
- Replies with the prediction result as a `eventmesh.ai-demo.prediction` event

This image is published at `quay.io/kevent-mesh/ai-demo-prediction-service`.

Expand Down Expand Up @@ -114,7 +114,7 @@ Test:
# Send a sample event
curl -i 'http://localhost:8083/' \
-H 'ce-time: 2023-09-26T12:35:14.372688+00:00' \
-H 'ce-type: com.knative.dev.minio.event' \
-H 'ce-type: eventmesh.ai-demo.storage' \
-H 'ce-source: pod.ai-demo.minio-webhook-service' \
-H 'ce-id: a9254f41-4d32-45d2-8293-e90d96876de1' \
-H 'ce-specversion: 1.0' \
Expand Down Expand Up @@ -145,7 +145,7 @@ Content-Length: 125
ce-specversion: 1.0
ce-id: df0340be-6e7e-4136-8445-895b8de32a0b
ce-source: prediction-service
ce-type: com.knative.dev.prediction.event
ce-type: eventmesh.ai-demo.prediction
ce-time: 2023-09-27T12:11:02.451656+00:00
Access-Control-Allow-Origin: *
Connection: close
Expand Down
2 changes: 1 addition & 1 deletion services/prediction-service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def prediction_request():
print(f"Returning prediction result for upload ID {upload_id}: {ce_data}")

ce_attributes = {
"type": "com.knative.dev.prediction.event",
"type": "eventmesh.ai-demo.prediction",
"source": SOURCE_DECLARATION,
}
event = CloudEvent(ce_attributes, ce_data)
Expand Down

0 comments on commit 7e5c4f9

Please sign in to comment.