apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: pd-canary-redis-ip
  namespace: metrics-tools
  labels:
    app.kubernetes.io/name: pd-canary-redis-ip
spec:
  schedule: "*/10 * * * *"
  concurrencyPolicy: Allow
  jobTemplate:
    metadata:
      labels:
        app.kubernetes.io/name: pd-canary-redis-ip
    spec:
      template:
        spec:
          restartPolicy: Never
          containers:
          - name: pd-canary-redis-ip
            image: "docker-registry.zooxlabs.com/pd_canary:redis-ip"
            env:
              - 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: PIPELINE_NAME
                value: "redis_ip_check"
              - name: PIPELINE_PARTITION
                value: "canary"
              - name: CANARY_TIMEOUT
                value: "600"
              - name: CANARY_TYPE
                value: "redis_ip_check"
              - 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
