apiVersion: apps/v1
kind: Deployment
metadata:
  name: bigquery-exporter-3h
spec:
  replicas: 1
  selector:
    matchLabels:
      run: bigquery-exporter
  template:
    metadata:
      labels:
        run: bigquery-exporter
      annotations:
        prometheus.io/scrape: 'true'
    spec:
      containers:
      - name: bigquery-exporter
        image: measurementlab/prometheus-bigquery-exporter:v1.1.1
        args: [ "-project={{GCLOUD_PROJECT}}",
                "-refresh=3h",
                "-gauge-query=/queries/bq_annotation.sql",
                "-gauge-query=/queries/bq_gardener_parse_time.sql",
                "-gauge-query=/queries/bq_gardener.sql",
                "-gauge-query=/queries/bq_gardener_historical.sql",
                "-gauge-query=/queries/bq_daily_archive.sql",
                "-gauge-query=/queries/bq_daily_tests.sql",
                "-gauge-query=/queries/bq_server.sql",
              ]
        ports:
        - containerPort: 9348
        volumeMounts:
        - mountPath: /queries
          name: bigquery-config

      volumes:
      - name: bigquery-config
        configMap:
          name: bigquery-exporter-config
