# Copyright (c) 2021 SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: hello
  labels:
    app.kubernetes.io/created-by: healthcheck-controller
    kfip.sighup.io/group: ResultController
    kfip.sighup.io/target: Controller
    kfip.sighup.io/check: e2e
spec:
  schedule: "*/1 * * * *"
  jobTemplate:
    metadata:
      labels:
        app.kubernetes.io/created-by: healthcheck-controller
        kfip.sighup.io/group: ResultController
        kfip.sighup.io/target: Controller
        kfip.sighup.io/check: e2e
    spec:
      template:
        spec:
          containers:
          - name: hello
            image: busybox
            imagePullPolicy: IfNotPresent
            command:
            - /bin/sh
            - -c
            - date; echo Hello from the Kubernetes cluster
          restartPolicy: OnFailure
