# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file defines a test cronjob you can use to see if the
# cronjob-label-controller is working.  Note that it does *not* set any labels.
# If you create/update this while the controller is running, a cronjob label
# will be added.

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: hello
spec:
  # Since we don't actually want this to run, set the schedule to only run on
  # Leap years when Feb 29th is a Sunday. 
  schedule: "0 0 29 2 0"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: hello
            image: busybox
            args:
            - /bin/sh
            - -c
            - echo This is a very simple CronJob
          restartPolicy: OnFailure
