apiVersion: batch/v1beta1
kind: CronJob
metadata:
  namespace: prow
  name: peribolos
spec:
  schedule: "30 12 * * *"  # Everyday 12:30.
  concurrencyPolicy: Forbid
  jobTemplate:
    metadata:
      labels:
        app: peribolos
    spec:
      template:
        spec:
          containers:
            - name: peribolos
              image: gcr.io/k8s-prow/peribolos:v20201124-061f85d859
              args:
                - --config-path=/etc/config/config.yaml
                - --github-token-path=/etc/github/token
                - --github-endpoint=http://ghproxy
                - --github-endpoint=https://api.github.com
                - --min-admins=2
                - --fix-org
                - --fix-org-members
                - --fix-teams
                - --fix-team-members
                - --fix-team-repos
                - --tokens=1200
                - --confirm
              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: config