apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: pd-canary-basic
  namespace: metrics-tools
  labels:
    app.kubernetes.io/name: pd-canary-basic
spec:
  schedule: "*/3 * * * *"
  concurrencyPolicy: Allow
  jobTemplate:
    metadata:
      labels:
        app.kubernetes.io/name: pd-canary-basic
    spec:
      template:
        spec:
          dnsPolicy: Default
          restartPolicy: Never
          containers:
          - name: pd-canary-basic
            image: "docker-registry.zooxlabs.com/pd_canary:normal_pd_sched"
            env:
              - name: SLACK_WEBHOOK_URL
                valueFrom:
                  secretKeyRef:
                    name: slack-webhook-sre
                    key: webhook_url
              - name: PIPEDREAM_API_URL
                value: "https://pipedream-scheduling.zooxlabs.com/v1/pipeline"
              - name: ACCOUNTING_API_URL
                value: "https://pipedream-accounting.zooxlabs.com/v0/pipelines"
              - name: ELASTICSEARCH_API_URL
                value: "https://search-metrics-production-c65mdhdibmbmkl4pfiqsj5yhmq.us-west-2.es.amazonaws.com"
              - name: PIPELINE_NAME
                value: "canary_pd_basic_normal_priority"
              - name: PIPELINE_PARTITION
                value: ""
              - name: CANARY_TIMEOUT
                value: "43200"
              - name: CHECK_INTERVAL
                value: "30"
              - name: CANARY_TYPE
                value: "basic"
              - name: PIPELINE_TIMEOUT
                value: "300"
              - name: LOG_LEVEL
                value: "INFO"
              - name: NO_SETUP
                value: "TRUE"
              - name: MODE
                value: "pipedream"
            workingDir: /opt/zoox
            command: ["bash"]
            args: ["-c", "python3 pd_canary.py"]
            imagePullPolicy: Always
