apiVersion: batch/v1beta1
kind: CronJob
metadata:
  namespace: prow
  name: label-sync
spec:
  schedule: "30 12 * * *"  # Every day 12:30
  concurrencyPolicy: Forbid
  jobTemplate:
    metadata:
      labels:
        app: label-sync
    spec:
      template:
        spec:
          containers:
            - name: label-sync
              image: gcr.io/k8s-prow/label_sync:v20211229-5ea9b96f66
              args:
                - --config=/etc/config/labels.yaml
                - --confirm=true
                - --only=ti-community-infra/tichi,ti-community-infra/configs,ti-community-infra/ti-community-bot,ti-community-infra/ti-challenge-bot,ti-community-infra/rfcs,ti-community-infra/devstats,ti-community-infra/devstats-dev-guide,pingcap/community,pingcap/docs,pingcap/docs-cn,pingcap/docs-dm,pingcap/docs-tidb-operator,pingcap/tiflow,tikv/community,tikv/pd,chaos-mesh/website
                - --token=/etc/github/token
              volumeMounts:
                - name: github-token
                  mountPath: /etc/github
                  readOnly: true
                - name: config
                  mountPath: /etc/config
                  readOnly: true
          restartPolicy: Never
          volumes:
            - name: github-token
              secret:
                secretName: github-token
            - name: config
              configMap:
                name: labels-config