Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram Kamlet sets CloudEvent source attribute to Knative sink #1813

Closed
lance opened this issue Nov 17, 2020 · 1 comment · Fixed by apache/camel-k-runtime#565
Closed
Assignees
Milestone

Comments

@lance
Copy link

lance commented Nov 17, 2020

Using a simple Telegram Kamlet to receive CloudEvents in a Knative Service results in events that have the CloudEvent source attribute set to the Knative sink for the events.

For example, this Kamlet:

apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: telegram-image-bot-source
spec:
  source:
    properties:
      authorizationToken: "REDACTED"
    ref:
      apiVersion: camel.apache.org/v1alpha1
      kind: Kamelet
      name: telegram-source
  sink:
    ref:
      apiVersion: serving.knative.dev/v1
      kind: Broker
      name: default

Produces this event:

Context Attributes,
  specversion: 1.0
  type: org.apache.camel.event
  source: knative://endpoint/camel-event-display?apiVersion=serving.knative.dev%2Fv1&kind=Service
  id: 049ACF1CAECA405-0000000000000009
  time: 2020-11-17T21:27:46.962Z
  datacontenttype: application/json
Data,
  { ... }

Note that the source is pointing to the Knative event display instead of being a URI identifying the context in which the event occurred. https://github.com/cloudevents/spec/blob/v1.0/spec.md#source-1

Also helpful would be to have the type be more finely grained. For example, org.apache.camel.event.kamlet.telegram.telegram-image-bot-source.

@lburgazzoli
Copy link
Contributor

Thos are likely the default values the camel-knative component sets when no other info are given, I think we need:

  1. the camel-k operator to set some more meaningful values
  2. the component to fail when no values are provided instead of falling back to internal defaults

@nicolaferraro what do you think ?

@nicolaferraro nicolaferraro added this to the 1.3.0 milestone Nov 18, 2020
@nicolaferraro nicolaferraro self-assigned this Nov 30, 2020
nicolaferraro added a commit to nicolaferraro/camel-k-runtime that referenced this issue Nov 30, 2020
lburgazzoli pushed a commit to apache/camel-k-runtime that referenced this issue Dec 1, 2020
orpiske pushed a commit to apache/camel-k-runtime that referenced this issue May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants