apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: healthchecks-io
namespace: hc
spec:
schedule: "*/1 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
startingDeadlineSeconds: 200
jobTemplate:
template:
containers:
- name: pinghc
env:
- name: HCURL
valueFrom:
secretKeyRef:
key: HCURL
image: busybox
args:
- /bin/sh
- -c
- "date && echo $HCURL && /bin/wget -q -O - --no-check-certificate $HCURL"
restartPolicy: OnFailure