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:
Clay Kauzlaric 2021-02-05 22:24:33 -06:00 committed by GitHub
parent 9fb19fe380
commit 4b074ada26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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"