apiVersion: apps/v1
kind: Deployment
metadata:
  name: groups-sync
  labels:
    app: groups-sync
spec:
  replicas: 1
  selector:
    matchLabels:
      app: groups-sync
  template:
    metadata:
      labels:
        app: groups-sync
    spec:
      containers:
      - name: groups
        image: groups
        args:
          - run 
          - --input=/data/internal-acls.git/google_groups/groups/*.yaml
          - --continuous=true           
          - --credentials-file=gs://kf-infra-gitops_secrets/autobot-at-kubeflow_client_secret.json
          - --secret=kf-infra-gitops/autobot-at-kubeflow-oauth-admin-api
        volumeMounts:
        - name: data
          mountPath: /data
      - name: git
        image: k8s.gcr.io/git-sync:v3.1.6
        args:        
        - --repo=https://github.com/kubeflow/internal-acls.git
        - --branch=master
        - --root=/data
        # In seconds
        - --wait=30
        volumeMounts:
        - name: data
          mountPath: /data
      serviceAccount: kf-autobot
      volumes:
        - name: data
          emptyDir: {}
