apiVersion: batch/v1beta1
kind: CronJob
metadata:
  labels:
    app.kubernetes.io/name: pd-metrics-cron
  name: pd-metrics-cron
  namespace: metrics-tools
spec:
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 1
  jobTemplate:
    metadata:
      labels:
        app.kubernetes.io/name: pd-metrics-cron
    spec:
      template:
        spec:
          containers:
          - args:
            - -c
            - source scripts/shell/zooxrc.sh; /opt/zoox/report_cluster_info
            command:
            - bash
            image: docker-registry.zooxlabs.com/driving:cluster_report_3
            imagePullPolicy: IfNotPresent
            name: pd-metrics-cron
            resources: {}
            terminationMessagePath: /dev/termination-log
            terminationMessagePolicy: File
            volumeMounts:
            - mountPath: /home/zoox/.pipedream
              name: pd-metrics-cron-creds
              readOnly: true
            workingDir: /home/zoox/driving
          dnsPolicy: ClusterFirst
          restartPolicy: Never
          schedulerName: default-scheduler
          securityContext:
            fsGroup: 1000
          terminationGracePeriodSeconds: 30
          volumes:
          - name: pd-metrics-cron-creds
            secret:
              defaultMode: 420
              items:
              - key: default_user
                mode: 493
                path: default_user
              - key: privateKey
                mode: 256
                path: kbambridge.key
              secretName: pd-metrics-cron-creds
  schedule: '*/2 * * * *'
  successfulJobsHistoryLimit: 3
  suspend: false
