mirror of https://github.com/knative/docs.git
Improve CronJob yaml in SinkBinding example (#3190)
* Improve CronJob yaml in SinkBinding example * use correct apiVersion * fix schedule so it runs every minute like the comment suggests * use busybox as default example image, following suit from [Kubernetes CronJob docs](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) * fix indentation * use appropriate heartbeat image
This commit is contained in:
parent
9fb19fe380
commit
4b074ada26
|
@ -87,13 +87,13 @@ Create a `CronJob` object:
|
|||
|
||||
1. Copy the sample YAML into a `cronjob.yaml` file:
|
||||
```yaml
|
||||
apiVersion: batch/v1
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: heartbeat-cron
|
||||
spec:
|
||||
# Run every minute
|
||||
schedule: "* * * * *"
|
||||
schedule: "*/1 * * * *"
|
||||
jobTemplate:
|
||||
metadata:
|
||||
labels:
|
||||
|
@ -104,9 +104,9 @@ Create a `CronJob` object:
|
|||
restartPolicy: Never
|
||||
containers:
|
||||
- name: single-heartbeat
|
||||
image: <FILL IN YOUR IMAGE HERE>
|
||||
image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/heartbeats
|
||||
args:
|
||||
- --period=1
|
||||
- --period=1
|
||||
env:
|
||||
- name: ONE_SHOT
|
||||
value: "true"
|
||||
|
|
Loading…
Reference in New Issue