Created
September 3, 2021 21:52
-
-
Save cardil/d205d5ae2065a703d8f5c301518ebd07 to your computer and use it in GitHub Desktop.
Example of cronjob that sends CloudEvents to K_SINK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: heartbeat-cron | |
spec: | |
# Run every minute | |
schedule: "*/1 * * * *" | |
jobTemplate: | |
metadata: | |
labels: | |
app: heartbeat-cron | |
spec: | |
template: | |
spec: | |
restartPolicy: Never | |
containers: | |
- name: single-heartbeat | |
image: quay.io/openshift-knative/heartbeats | |
args: | |
- --period=1 | |
env: | |
- name: ONE_SHOT | |
value: "true" | |
- name: POD_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: POD_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment