apiVersion: batch/v1beta1
kind: CronJob
metadata:
  namespace: prow
  name: label-sync
spec:
  schedule: "17 * * * *"  # 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:v20211229-5ea9b96f66
              args:
                - --config=/etc/config/labels.yaml
                - --confirm=true
                - --only=ti-community-infra/test-dev
                - --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
