apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: pd-canary-kraken-elevated
  namespace: metrics-tools
  labels:
    app.kubernetes.io/name: pd-canary-kraken-elevated
spec:
  schedule: "*/3 * * * *"
  concurrencyPolicy: Allow
  jobTemplate:
    metadata:
      labels:
        app.kubernetes.io/name: pd-canary-kraken-elevated
    spec:
      template:
        spec:
          restartPolicy: Never
          containers:
          - name: pd-canary-kraken
            image: "docker-registry.zooxlabs.com/pd_canary:kraken_elevated"
            env:
              - name: AWS_ACCESS_KEY_ID
                valueFrom:
                  secretKeyRef:
                    name: infra-tools-aws-ro-creds
                    key: aws_access_key_id
              - name: AWS_SECRET_ACCESS_KEY
                valueFrom:
                  secretKeyRef:
                    name: infra-tools-aws-ro-creds
                    key: aws_secret_access_key
              - name: AWS_DEFAULT_REGION
                value: us-west-1
              - name: SLACK_WEBHOOK_URL
                valueFrom:
                  secretKeyRef:
                    name: slack-webhook-sre
                    key: webhook_url
              - name: PIPEDREAM_API_URL
                value: "https://pipedream.zooxlabs.com/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: CANARY_TYPE
                value: KRAKEN
              - name: PIPELINE_NAME
                value: "canary_pd_kraken_elevated_priority"
              - name: PIPELINE_PARTITION
                value: "canary"
              - name: CANARY_TIMEOUT
                value: "600"
              - name: CHECK_INTERVAL
                value: "10"
              - name: PIPELINE_TIMEOUT
                value: "300"
              - name: LOG_LEVEL
                value: "DEBUG"
            workingDir: /opt/zoox
            command: ["bash"]
            args: ["-c", "python3 pd_canary.py"]
            imagePullPolicy: Always
