apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: rancher-count-piplines
spec:
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1
  schedule: "1 0 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: curl
            image: curlimages/curl:7.76.1
            imagePullPolicy: IfNotPresent
            command:
            - /bin/sh
            - -c
            - curl --location --request GET 'http://devopsapi-service:10009/sync_rancher/count_each_pj_piplines_by_days'
          restartPolicy: OnFailure
