apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: label-sync-cron
spec:
  schedule: "0 */6 * * *"    # Every day 23:17 / 11:17PM
  concurrencyPolicy: Forbid
  jobTemplate:
    metadata:
      labels:
        app: label-sync
    spec:
      template:
        spec:
          containers:
            - name: label-sync
              image: gcr.io/k8s-testimages/label_sync:v20180227-377685119
              args:
              - --config=/etc/config/kubeflow_label.yml
              - --confirm=true
              - --orgs=kubeflow
              - --token=/etc/github/bot-token
              volumeMounts:
              - name: oauth
                mountPath: /etc/github
                readOnly: true
              - name: config
                mountPath: /etc/config
                readOnly: true
          restartPolicy: Never
          volumes:
          - name: oauth
            secret:
              secretName: bot-token-github
          - name: config
            configMap:
              name: label-config-v2