---
apiVersion: v1
kind: ConfigMap
metadata:
  name: thanos-default
  namespace: monitoring-system
data:
  values.yaml: |
    query:
      replicaCount: 2
      enabled: true
      logLevel: info
      replicaLabel: prometheus_replica
      dnsDiscovery:
        enabled: true
        ## Sidecars service name to discover them using DNS discovery
        ##
        sidecarsService: 'prometheus-prometheus-thanos'
        ## Sidecars namespace to discover them using DNS discovery'
        ##
        sidecarsNamespace: '{{ .Release.Namespace }}'

      strategyType: RollingUpdate
      
      ## Thanos Querier containers' resource requests and limits
      ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
      ##
      resources:
        # We usually recommend not to specify default resources and to leave this as a conscious
        # choice for the user. This also increases chances charts run on environments with little
        # resources, such as Minikube. If you do want to specify resources, uncomment the following
        # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
        limits:
        #   cpu: 100m
          memory: 4Gi
        requests:
        #   cpu: 100m
          memory: 4Gi

      ## Autoscaling parameters
      ##
      autoscaling:
        enabled: false
        #  minReplicas: 1
        #  maxReplicas: 11
        #  targetCPU: 50
        #  targetMemory: 50

      ## Querier Pod Disruption Budget configuration
      ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
      ##
      pdb:
        create: true
        minAvailable: 1
    queryFrontend:
      enabled: true
      replicaCount: 2
      resources:
        limits:
        #   cpu: 100m
          memory: 1Gi
        requests:
        #   cpu: 100m
          memory: 128Mi
    bucketweb:
      enabled: false
    compactor:
      enabled: false
    storegateway:
      enabled: false
    ruler:
      enabled: false
    minio:
      enabled: false
    metrics:
      enabled: true
      serviceMonitor:
        enabled: true
        interval: 15s
