K8S cronjob清理es索引

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: delesindexjob
spec:
  schedule: "*/1 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: delesindexjob
            image: centos
            args:
            - /bin/sh
            - -c
            - curl -X DELETE  "ip:9200/zipkin-qa:span-`date +%F -d "-7 days"`"
            #或者把args字段去掉,用commnd字段
            # command: ["curl", "-X", "POST","--header",'hashtag-notice-header: 3509bc492a27b938ce3843d17083d31d', "http://172.17.122.118:8085/fa055/notice/hotHashTag12" ]
          restartPolicy: OnFailure
          imagePullSecrets:
          - name: qcloudregistrykey
          - name: tencenthubkey