apiVersion: batch/v1
kind: CronJob
metadata:
  name: heliumevents-miner-info
  namespace: heliumevents
spec:
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1
  schedule: "0 */1 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: curl-command
            image: curlimages/curl
            imagePullPolicy: Always
            args: 
            - /bin/sh
            - -c
            - >
                curl -s 'http://10.0.0.156/miner.json' 
                | 
                curl  -H 'Content-Type: application/json' -X PUT --data-binary @- 'http://elasticsearch-service:9200/clean-rose-parakeet-miner/_doc/info'
          restartPolicy: Never
