apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: policybot-userdatamgr
  labels:
    app: policybot-userdatamgr
spec:
  schedule: "0 8 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: policybot
              image: "{{ .Values.image }}"
              imagePullPolicy: "{{ .Values.imagePullPolicy }}"
              args:
                - /policybot
                - userdatamgr
                - --config_repo
                - istio/bots/master
                - --config_path
                - policybot/config
              envFrom:
                - secretRef:
                    name: policybot
          restartPolicy: OnFailure
