Skip to content

Instantly share code, notes, and snippets.

@matzew
Created September 18, 2019 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matzew/80429cdcd3bd8b6c59859e3feb5fa278 to your computer and use it in GitHub Desktop.
Save matzew/80429cdcd3bd8b6c59859e3feb5fa278 to your computer and use it in GitHub Desktop.

The InMemoryChannel (default - if not changed):

apiVersion: messaging.knative.dev/v1alpha1
kind: InMemoryChannel
metadata:
  name: testchannel

The Cronjob Source:

apiVersion: sources.eventing.knative.dev/v1alpha1
kind: CronJobSource
metadata:
  name: test-cronjob-source
spec:
  schedule: "*/2 * * * *"
  data: '{"message": "Hello world!"}'
  sink:
    apiVersion: messaging.knative.dev/v1alpha1
    kind: InMemoryChannel
    name: testchannel

The Subscription:

apiVersion: messaging.knative.dev/v1alpha1
kind: Subscription
metadata:
  name: sub1
spec:
  channel:
    apiVersion: messaging.knative.dev/v1alpha1
    kind: InMemoryChannel
    name: testchannel
  subscriber:
    ref:
      apiVersion: serving.knative.dev/v1alpha1
      kind: Service
      name: blah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment