apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: sync-ad
spec:
  schedule: "0 15 * * *"
  successfulJobsHistoryLimit: 2
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: curl
            image: curlimages/curl:7.76.1
            imagePullPolicy: IfNotPresent
            command:
            - /bin/sh
            - -c
            - curl -i -F "batch=true" -F "ad_type=iii"  -X POST http://devopsapi-service:10009/plugins/ad/users
          restartPolicy: OnFailure