apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: label-sync
spec:
  schedule: "52 * * * *"  # Every hour at 17 minutes past the hour
  concurrencyPolicy: Forbid
  jobTemplate:
    metadata:
      labels:
        app: label-sync
    spec:
      template:
        spec:
          containers:
            - name: label-sync
              image: gcr.io/k8s-prow/label_sync:v20190814-9981dc3c5
              args:
              - --config=/etc/config/labels.yaml
              - --confirm=true
              - --only=yunify/qingcloud-csi,yunify/qingstor-csi,QingCloudAppcenter/QKE,kubesphere-test/prow-tutorial,kubesphere/s2ioperator,kubesphere/porter,yunify/qingcloud-cloud-controller-manager,yunify/hostnic-cni,kubesphere/kubesphere,kubesphere/s2irun
              - --token=/etc/github/oauth
              volumeMounts:
              - name: oauth
                mountPath: /etc/github
                readOnly: true
              - name: config
                mountPath: /etc/config
                readOnly: true
          restartPolicy: Never
          volumes:
          - name: oauth
            secret:
              secretName: oauth-token
          - name: config
            configMap:
              name: label-config