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

Add runtime support for Knative sinkbinding #365

Closed
nicolaferraro opened this issue Jun 18, 2020 · 0 comments · Fixed by #372 or #411
Closed

Add runtime support for Knative sinkbinding #365

nicolaferraro opened this issue Jun 18, 2020 · 0 comments · Fixed by #372 or #411
Assignees
Labels
component/knative enhancement New feature or request
Milestone

Comments

@nicolaferraro
Copy link
Member

Sinkbinding allows to use an existing Camel K Integration as as a standard Knative source (it's listed among sources and compatible with the kn tools), without having to use the CamelSource object.

To make the user experience good, there are some things to hammer here and there, but we can already enable them if we do some changes in the runtime.

E.g. we can run an integration named routes, then provide the following sinkbinding:

apiVersion: sources.knative.dev/v1alpha1
kind: SinkBinding
metadata:
  name: bind-camel-routes
spec:
  subject:
    apiVersion: apps/v1
    kind: Deployment
    name: routes
  sink:
    ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: event-display
  ceOverrides:
    extensions:
      sink: bound

It targets the underlying deployment created by the integration, but we can work to have also the Camel K Integration usable as subject in the future.

The contract of the SinkBinding spec says that information about the target endpoint will be injected in the following envs of the running pod:

  • K_SINK: target URL for sending cloud events (note that we already use KNATIVE_SINK to indicate the logical name of the sink in the loader, we can rename that to avoid confusion)
  • K_CE_OVERRIDES: header information to override

We should configure the knative component to use those properties if available, before looking in the general config (or if there's no match there).

lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue Jun 21, 2020
@lburgazzoli lburgazzoli self-assigned this Jun 21, 2020
@lburgazzoli lburgazzoli added component/knative enhancement New feature or request labels Jun 21, 2020
@lburgazzoli lburgazzoli added this to the 1.4.0 milestone Jun 21, 2020
lburgazzoli added a commit to lburgazzoli/apache-camel-k-runtime that referenced this issue Jun 21, 2020
nicolaferraro added a commit to nicolaferraro/camel-k-runtime that referenced this issue Jul 24, 2020
nicolaferraro added a commit to nicolaferraro/camel-k-runtime that referenced this issue Jul 24, 2020
nicolaferraro added a commit to nicolaferraro/camel-k-runtime that referenced this issue Jul 24, 2020
davsclaus added a commit that referenced this issue Jul 30, 2020
Fix #365: change sinkbinding to be a customizer unrelated to the knat…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment