We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.
Migrating from CronJobSource to the PingSource
In 0.13, the deprecated CronJobSource
should be converted to the PingSource
.
The YAML file for a CronJobSource
that emits events to a Knative Serving service will look similar to this:
apiVersion: sources.knative.dev/v1alpha1
kind: CronJobSource
metadata:
name: cronjob-source
spec:
schedule: "* * * * *"
data: '{"message": "Hello world!"}'
sink:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-display
To migrate this source to a PingSource
, the following steps are required::
- Different
apiVersion
andkind
between the two PingSource
uses thejsonData
attribute instead of thedata
attribute.
The updated YAML for PingSource
will look similar to the following:
apiVersion: sources.knative.dev/v1alpha2
kind: PingSource
metadata:
name: ping-source
spec:
schedule: "* * * * *"
jsonData: '{"message": "Hello world!"}'
sink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-display
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.