apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: convertice
spec:
  schedule: "0 12 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: convertice
              volumeMounts:
                - name: gcp-credentials-volume
                  mountPath: /var/secrets/google
              image: gcr.io/buffer-data/convertice-job:0.2.1
              env:
                - name: GOOGLE_APPLICATION_CREDENTIALS
                  value: /var/secrets/google/key.json
                - name: SEGMENT_WRITE_KEY
                  valueFrom:
                    secretKeyRef:
                      name: segment
                      key: write-key
              imagePullPolicy: Always
          restartPolicy: OnFailure
          volumes:
            - name: gcp-credentials-volume
              secret:
                secretName: gcp-convertice
