apiVersion: v1
kind: Pod
metadata:
  annotations:
    prometheus.io/port: "9295"
    prometheus.io/scrape: "true"
  name: redash-exporter
spec:
  automountServiceAccountToken: false
  containers:
  - name: redash-exporter
    image: egeneralov/redash-exporter:v0.2
    ports:
      - containerPort: 9295
        name: http
        protocol: TCP
    command:
      - /go/bin/redash-exporter
      - -redashScheme=http
      - -metricsInterval=10
      - -redashHost=redash
      - -redashPort=80
      - -listen-address=:9295
    env:
      - name: GOMAXPROC
        valueFrom:
          resourceFieldRef:
            containerName: redash-exporter
            divisor: "0"
            resource: limits.cpu
      - name: REDASH_API_KEY
        value: "REPLACE_ME______________________REPLACE_ME"
    resources:
      limits:
        cpu: "1"
        memory: 128Mi
      requests:
        cpu: "100m"
        memory: 64Mi
