## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, and imagePullSecrets
##
# global:
#   imageRegistry: myRegistryName
#   imagePullSecrets:
#     - myRegistryKeySecretName
#   storageClass: myStorageClass

## Bitnami Thanos image
## ref: https://hub.docker.com/r/bitnami/thanos/tags/
##
image:
  registry: docker.io
  repository: bitnami/thanos
  tag: 0.15.0-scratch-r3
  ## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

## String to partially override thanos.fullname template (will maintain the release name)
##
# nameOverride:

## String to fully override thanos.fullname template
##
# fullnameOverride:

## Kubernetes Cluster Domain
##
clusterDomain: cluster.local

## Objstore Configuration
## Specify content for objstore.yml
##
# objstoreConfig:

## Secret with Objstore Configuration
## Note: This will override objstoreConfig
##
# existingObjstoreSecret:
##  optional item list for specifying a custom Secret key. If so, path should be objstore.yml
# existingObjstoreSecretItems: []

## Provide a common service account to be shared with all components
##
# existingServiceAccount: my-service-account

## Thanos Querier parameters
##
querier:
  ## Set to true to enable Thanos Querier component
  ##
  enabled: true

  ## Log level
  ##
  logLevel: info

  ## Provide any additional annotations which may be required
  ##
  serviceAccount:
    annotations: {}
    ## Provide an existing service account for querier
    ##
    # existingServiceAccount: querier-service-account

  ## Labels to treat as a replica indicator along which data is deduplicated
  ##
  replicaLabel: [replica]

  ## Dinamically configure store APIs using DNS discovery
  ##
  dnsDiscovery:
    enabled: true
    ## Sidecars service name to discover them using DNS discovery
    ## Evaluated as a template.
    # sidecarsService: "{{ .Release.Name }}-prometheus-thanos"
    ##
    ## Sidecars namespace to discover them using DNS discovery
    ## Evaluated as a template.
    # sidecarsNamespace: "{{ .Release.Namespace }}"

  ## Statically configure store APIs to connect with Thanos Querier
  ##
  stores: []

  ## Querier Service Discovery Configuration
  ## Specify content for servicediscovery.yml
  ##
  # sdConfig:

  ## ConfigMap with Querier Service Discovery Configuration
  ## NOTE: This will override querier.sdConfig
  ##
  # existingSDConfigmap:

  ## Extra Flags to passed to Thanos Querier
  ##
  extraFlags: []

  ## Number of Thanos Querier replicas to deploy
  ##
  replicaCount: 1

  ## StrategyType, can be set to RollingUpdate or Recreate by default.
  ##
  strategyType: RollingUpdate

  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Annotations for querier pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Pod priority
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## K8s Security Context for Thanos Querier pods
  ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  securityContext:
    enabled: true
    fsGroup: 1001
    runAsUser: 1001

  # Create ClusterRole and ClusterRolebing for the Service account
  rbac:
    create: false
  
  # Create PodSecurity Policy
  psp:
    create: false
  
  ## 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: 128Mi
    requests: {}
    #   cpu: 100m
    #   memory: 128Mi

  ## Thanos Querier pods' liveness and readiness probes. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ##
  livenessProbe:
    httpGet:
      path: /-/healthy
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6
  readinessProbe:
    httpGet:
      path: /-/ready
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6

  ## Thanos Querier GRPC TLS parameters
  ## to configure --grpc-server-tls-cert, --grpc-server-tls-key, --grpc-server-tls-client-ca, --grpc-client-tls-secure, --grpc-client-tls-cert, --grpc-client-tls-key, --grpc-client-tls-ca, --grpc-client-server-name
  ## ref: https://github.com/thanos-io/thanos/blob/master/docs/components/query.md#flags
  grpcTLS:
    # TLS server side
    server:
      # Enable TLS for GRPC server
      secure: false
      # TLS Certificate for gRPC server, leave blank to disable TLS
      cert:
      # TLS Key for the gRPC server, leave blank to disable TLS
      key:
      # TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
      ca:
    # TLS client side
    client:
      # Use TLS when talking to the gRPC server
      secure: false
      # TLS Certificates to use to identify this client to the server
      cert:
      # TLS Key for the client's certificate
      key:
      # TLS CA Certificates to use to verify gRPC servers
      ca:
      # Server name to verify the hostname on the returned gRPC certificates. See https://tools.ietf.org/html/rfc4366#section-3.1
      servername:

  ## Service paramaters
  ##
  service:
    ## Service type
    ##
    type: ClusterIP
    ## Thanos Querier service clusterIP IP
    ##
    # clusterIP: None
    ## HTTP Port
    ##
    http:
      port: 9090
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## GRPC Port
    ##
    grpc:
      port: 10901
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## Set the LoadBalancer service type to internal only.
    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
    ##
    # loadBalancerIP:
    ## Load Balancer sources
    ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ##
    # loadBalancerSourceRanges:
    # - 10.10.10.0/24
    ## Provide any additional annotations which may be required
    ##
    annotations: {}

  ## 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: false
    ## Min number of pods that must still be available after the eviction
    ##
    minAvailable: 1
    ## Max number of pods that can be unavailable after the eviction
    ##
    # maxUnavailable: 1

  ## Configure the ingress resource that allows you to access Thanos Querier
  ## ref: http://kubernetes.io/docs/user-guide/ingress/
  ##
  ingress:
    ## Set to true to enable ingress record generation
    ##
    enabled: false

    ## Set this to true in order to add the corresponding annotations for cert-manager
    ##
    certManager: false

    ## When the ingress is enabled, a host pointing to this will be created
    ##
    hostname: thanos.local

    ## Ingress annotations done as key:value pairs
    ## For a full list of possible ingress annotations, please see
    ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
    ##
    ## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
    ##
    annotations: {}

    ## The list of additional hostnames to be covered with this ingress record.
    ## Most likely the hostname above will be enough, but in the event more hosts are needed, this is an array
    # extraHosts:
    # - name: thanos.local
    #   path: /

    ## The tls configuration for additional hostnames to be covered with this ingress record.
    ## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
    # extraTls:
    # - hosts:
    #     - thanos.local
    #   secretName: thanos.local-tls

    ## If you're providing your own certificates, please use this to add the certificates as secrets
    ## key and certificate should start with -----BEGIN CERTIFICATE----- or
    ## -----BEGIN RSA PRIVATE KEY-----
    ##
    ## name should line up with a tlsSecret set further up
    ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
    ##
    ## It is also possible to create and manage the certificates outside of this helm chart
    ## Please see README.md for more information
    ##
    secrets: []
    # - name: thanos.local-tls
    #   key:
    #   certificate:

    ## Create an ingress object for the GRPC service. This requires an HTTP/2
    ## capable Ingress controller (eg. traefik using AWS NLB). Example annotations
    ## - ingress.kubernetes.io/protocol: h2c
    ## - service.beta.kubernetes.io/aws-load-balancer-type: nlb
    ## - service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    ## For more information see https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/
    ## and also the documentation for your ingress controller.
    ##
    ## The options that are accepted are identical to the HTTP one listed above
    grpc:
      enabled: false
      certManager: false
      hostname: thanos-grpc.local
      annotations: {}

      ## The list of additional hostnames to be covered with this ingress record.
      ## Most likely the hostname above will be enough, but in the event more hosts are needed, this is an array
      # extraHosts:
      # - name: thanos-grpc.local
      #   path: /

      ## The tls configuration for additional hostnames to be covered with this ingress record.
      ## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
      # extraTls:
      # - hosts:
      #     - thanos-grpc.local
      #   secretName: thanos-grpc.local-tls

      ## If you're providing your own certificates, please use this to add the certificates as secrets
      ## key and certificate should start with -----BEGIN CERTIFICATE----- or
      ## -----BEGIN RSA PRIVATE KEY-----
      ##
      ## name should line up with a tlsSecret set further up
      ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
      ##
      ## It is also possible to create and manage the certificates outside of this helm chart
      ## Please see README.md for more information
      ##
      secrets: []
      # - name: thanos-grpc.local-tls
      #   key:
      #   certificate:

## Thanos Bucket Web parameters
##
bucketweb:
  ## Set to true to enable Thanos Bucket Web component
  ##
  enabled: false

  ## Log level
  ##
  logLevel: info

  ## Provide any additional annotations which may be required
  ##
  serviceAccount:
    annotations: {}
    ## Provide an existing service account for bucketweb
    ##
    # existingServiceAccount: bucketweb-service-account

  ## Refresh interval to download metadata from remote storage
  ##
  refresh: 30m

  ## Timeout to download metadata from remote storage
  ##
  timeout: 5m

  ## Extra Flags to passed to Bucket Web
  ##
  extraFlags: []

  ## Number of Thanos Querier replicas to deploy
  ##
  replicaCount: 1

  ## StrategyType, can be set to RollingUpdate or Recreate by default.
  ##
  strategyType: RollingUpdate

  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Annotations for bucketweb pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Pod priority
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## K8s Security Context for Thanos Bucket Web pods
  ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  securityContext:
    enabled: true
    fsGroup: 1001
    runAsUser: 1001

  ## Thanos Bucket Web 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: 128Mi
    requests: {}
    #   cpu: 100m
    #   memory: 128Mi

  ## Thanos Bucket Web pods' liveness and readiness probes. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ##
  livenessProbe:
    httpGet:
      path: /
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6
  readinessProbe:
    httpGet:
      path: /
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6

  ## Service paramaters
  ##
  service:
    ## Service type
    ##
    type: ClusterIP
    ## Thanos Bucket Web service clusterIP IP
    ##
    # clusterIP: None
    ## HTTP Port
    ##
    http:
      port: 8080
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## Set the LoadBalancer service type to internal only.
    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
    ##
    # loadBalancerIP:
    ## Load Balancer sources
    ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ##
    # loadBalancerSourceRanges:
    # - 10.10.10.0/24
    ## Provide any additional annotations which may be required
    ##
    annotations: {}

  ## Bucket Web Pod Disruption Budget configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
  ##
  pdb:
    create: false
    ## Min number of pods that must still be available after the eviction
    ##
    minAvailable: 1
    ## Max number of pods that can be unavailable after the eviction
    ##
    # maxUnavailable: 1

  ## Configure the ingress resource that allows you to access Thanos Bucketweb
  ## ref: http://kubernetes.io/docs/user-guide/ingress/
  ##
  ingress:
    ## Set to true to enable ingress record generation
    ##
    enabled: false

    ## Set this to true in order to add the corresponding annotations for cert-manager
    ##
    certManager: false

    ## When the ingress is enabled, a host pointing to this will be created
    ##
    hostname: thanos-bucketweb.local

    ## Ingress annotations done as key:value pairs
    ## For a full list of possible ingress annotations, please see
    ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
    ##
    ## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
    ##
    annotations: {}

    ## The list of additional hostnames to be covered with this ingress record.
    ## Most likely the hostname above will be enough, but in the event more hosts are needed, this is an array
    # extraHosts:
    # - name: thanos-bucketweb.local
    #   path: /

    ## The tls configuration for additional hostnames to be covered with this ingress record.
    ## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
    # extraTls:
    # - hosts:
    #     - thanos-bucketweb.local
    #   secretName: thanos-bucketweb.local-tls

    ## If you're providing your own certificates, please use this to add the certificates as secrets
    ## key and certificate should start with -----BEGIN CERTIFICATE----- or
    ## -----BEGIN RSA PRIVATE KEY-----
    ##
    ## name should line up with a tlsSecret set further up
    ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
    ##
    ## It is also possible to create and manage the certificates outside of this helm chart
    ## Please see README.md for more information
    ##
    secrets: []
    # - name: thanos-bucketweb.local-tls
    #   key:

## Thanos Compactor parameters
##
compactor:
  ## Set to true to enable Thanos Compactor component
  ##
  enabled: true

  ## Log level
  ##
  logLevel: info

  ## Provide any additional annotations which may be required
  ##
  serviceAccount:
    annotations: {}
    ## Provide an existing service account for compactor
    ##
    # existingServiceAccount: compactor-service-account

  ## Resolution and Retention flags
  ##
  retentionResolutionRaw: 30d
  retentionResolution5m: 30d
  retentionResolution1h: 10y

  ## Minimum age of fresh (non-compacted) blocks
  ## before they are being processed
  ##
  consistencyDelay: 30m

  ## Extra Flags to passed to Thanos Compactor
  ##
  extraFlags: []

  ## StrategyType, can be set to RollingUpdate or Recreate by default.
  ##
  strategyType: RollingUpdate

  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Annotations for compactor pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Pod priority
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## K8s Security Context for Thanos Compactor pods
  ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  securityContext:
    enabled: true
    fsGroup: 1001
    runAsUser: 1001

  ## Thanos Compactor 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: 128Mi
    requests: {}
    #   cpu: 100m
    #   memory: 128Mi

  ## Thanos Compactor pods' liveness and readiness probes. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ##
  livenessProbe:
    httpGet:
      path: /-/healthy
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6
  readinessProbe:
    httpGet:
      path: /-/ready
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6

  ## Service paramaters
  ##
  service:
    ## Service type
    ##
    type: ClusterIP
    ## Thanos Compactor service clusterIP IP
    ##
    # clusterIP: None
    ## HTTP Port
    ##
    http:
      port: 9090
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## Set the LoadBalancer service type to internal only.
    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
    ##
    # loadBalancerIP:
    ## Load Balancer sources
    ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ##
    # loadBalancerSourceRanges:
    # - 10.10.10.0/24
    ## Provide any additional annotations which may be required
    ##
    annotations: {}

  ## Persistence paramaters
  ##
  persistence:
    enabled: true
    ## A manually managed Persistent Volume and Claim
    ## If defined, PVC must be created manually before volume will be bound
    ## The value is evaluated as a template
    ##
    # existingClaim:
    ## Persistent Volume Storage Class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ## set, choosing the default provisioner.
    ##
    # storageClass: "-"
    ## Persistent Volume Access Mode
    ##
    accessModes:
      - ReadWriteOnce
    ## Persistent Volume Claim size
    ##
    size: 8Gi

## Thanos Store Gateway parameters
##
storegateway:
  ## Set to true to enable Thanos Store Gateway component
  ##
  enabled: true

  ## Log level
  ##
  logLevel: info

  ## Provide any additional annotations which may be required
  ##
  serviceAccount:
    annotations: {}
    ## Provide an existing service account for storegateway
    ##
    # existingServiceAccount: storegateway-service-account

  ## Extra Flags to passed to Thanos Store Gateway
  ##
  extraFlags: []

  ## Store Gateway Cache Configuration
  ## Specify content for config.yml
  ##
  # config:

  ## ConfigMap with Store Gateway Cache  Configuration
  ## NOTE: This will override storegateway.config
  ##
  # existingConfigmap:

  ## Number of Thanos Store Gateway replicas to deploy
  ##
  replicaCount: 1

  ## StrategyType, can be set to RollingUpdate or OnDelete by default.
  ##
  updateStrategyType: RollingUpdate

  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Annotations for storegateway pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Pod priority
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## K8s Security Context for Thanos Store Gateway pods
  ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  securityContext:
    enabled: true
    fsGroup: 1001
    runAsUser: 1001

  ## Thanos Store Gateway 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: 128Mi
    requests: {}
    #   cpu: 100m
    #   memory: 128Mi

  ## Thanos Store Gateway pods' liveness and readiness probes. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ##
  livenessProbe:
    httpGet:
      path: /-/healthy
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6
  readinessProbe:
    httpGet:
      path: /-/ready
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6

  ## Service paramaters
  ##
  service:
    ## Service type
    ##
    type: ClusterIP
    ## Thanos Store Gateway service clusterIP IP
    ##
    # clusterIP: None
    ## HTTP Port
    ##
    http:
      port: 9090
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## GRPC Port
    ##
    grpc:
      port: 10901
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## Set the LoadBalancer service type to internal only.
    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
    ##
    # loadBalancerIP:
    ## Load Balancer sources
    ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ##
    # loadBalancerSourceRanges:
    # - 10.10.10.0/24
    ## Provide any additional annotations which may be required
    ##
    annotations: {}
    ## Create additional Headless service
    ##
    additionalHeadless: false

  ## Persistence paramaters
  ##
  persistence:
    enabled: true
    ## A manually managed Persistent Volume and Claim
    ## If defined, PVC must be created manually before volume will be bound
    ## The value is evaluated as a template
    ##
    # existingClaim:
    ## Persistent Volume Storage Class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ## set, choosing the default provisioner.
    ##
    # storageClass: "-"
    ## Persistent Volume Access Mode
    ##
    accessModes:
      - ReadWriteOnce
    ## Persistent Volume Claim size
    ##
    size: 8Gi

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

  ## Store Gateway Pod Disruption Budget configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
  ##
  pdb:
    create: false
    ## Min number of pods that must still be available after the eviction
    ##
    minAvailable: 1
    ## Max number of pods that can be unavailable after the eviction
    ##
    # maxUnavailable: 1

## Thanos Ruler parameters
##
ruler:
  ## Set to true to enable Thanos Ruler component
  ##
  enabled: true

  ## Log level
  ##
  logLevel: info

  ## Provide any additional annotations which may be required
  ##
  serviceAccount:
    annotations: {}
    ## Provide an existing service account for ruler
    ##
    # existingServiceAccount: ruler-service-account

  ## Dinamically configure Querier APIs using DNS discovery
  ##
  dnsDiscovery:
    enabled: true

  ## Alermanager URLs array
  ##
  alertmanagers: []

  ## The default evaluation interval to use
  ##
  evalInterval: 1m

  ## Used to set the 'ruler_cluster' label
  ##
  # clusterName:

  ## Extra Flags to passed to Thanos Ruler
  ##
  extraFlags: []

  ## Ruler Configuration
  ## Specify content for ruler.yml
  ##
  # config:

  ## ConfigMap with Ruler Configuration
  ## NOTE: This will override ruler.config
  ##
  # existingConfigmap:

  ## Number of Thanos Ruler replicas to deploy
  ##
  replicaCount: 1

  ## StrategyType, can be set to RollingUpdate or OnDelete by default.
  ##
  updateStrategyType: RollingUpdate

  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Annotations for ruler pods
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Pod priority
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## K8s Security Context for Thanos Ruler pods
  ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  securityContext:
    enabled: true
    fsGroup: 1001
    runAsUser: 1001

  ## Thanos Ruler 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: 128Mi
    requests: {}
    #   cpu: 100m
    #   memory: 128Mi

  ## Thanos Ruler pods' liveness and readiness probes. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ##
  livenessProbe:
    httpGet:
      path: /-/healthy
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6
  readinessProbe:
    httpGet:
      path: /-/ready
      port: http
    initialDelaySeconds: 30
    timeoutSeconds: 30
    # periodSeconds: 10
    # successThreshold: 1
    # failureThreshold: 6

  ## Service paramaters
  ##
  service:
    ## Service type
    ##
    type: ClusterIP
    ## Thanos Ruler service clusterIP IP
    ##
    # clusterIP: None
    ## HTTP Port
    ##
    http:
      port: 9090
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## GRPC Port
    ##
    grpc:
      port: 10901
      ## Specify the nodePort value for the LoadBalancer and NodePort service types.
      ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      ##
      # nodePort:
    ## Set the LoadBalancer service type to internal only.
    ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
    ##
    # loadBalancerIP:
    ## Load Balancer sources
    ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
    ##
    # loadBalancerSourceRanges:
    # - 10.10.10.0/24
    ## Provide any additional annotations which may be required
    ##
    annotations: {}
    ## Create additional Headless service
    ##
    additionalHeadless: false

  ## Persistence paramaters
  ##
  persistence:
    enabled: true
    ## A manually managed Persistent Volume and Claim
    ## If defined, PVC must be created manually before volume will be bound
    ## The value is evaluated as a template
    ##
    # existingClaim:
    ## Persistent Volume Storage Class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ## set, choosing the default provisioner.
    ##
    # storageClass: "-"
    ## Persistent Volume Access Mode
    ##
    accessModes:
      - ReadWriteOnce
    ## Persistent Volume Claim size
    ##
    size: 8Gi

  ## Ruler Pod Disruption Budget configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
  ##
  pdb:
    create: false
    ## Min number of pods that must still be available after the eviction
    ##
    minAvailable: 1
    ## Max number of pods that can be unavailable after the eviction
    ##
    # maxUnavailable: 1

## Prometheus metrics
##
metrics:
  enabled: true

  ## Prometheus Operator ServiceMonitor configuration
  ##
  serviceMonitor:
    enabled: true
    ## Namespace in which Prometheus is running
    ##
    # namespace: monitoring
    ## Labels to add to the ServiceMonitor object
    ##
    # labels:
    ## Interval at which metrics should be scraped.
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ##
    # interval: 10s
    ## Timeout after which the scrape is ended
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ##
    # scrapeTimeout: 10s

## Init Container paramaters
## Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each component
## values from the securityContext section of the component
##
volumePermissions:
  enabled: false
  ## Bitnami Minideb image
  ## ref: https://hub.docker.com/r/bitnami/minideb/tags/
  ##
  image:
    registry: docker.io
    repository: bitnami/minideb
    tag: buster
    ## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
    ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
    ##
    pullPolicy: Always
    ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
    ##
    # pullSecrets:
    #   - myRegistryKeySecretName

## Minio Chart configuration
##
minio:
  ## Set to true to deploy a MinIO chart
  ## to be used as an objstore for Thanos
  ##
  enabled: false

  ## MinIO credentials
  ##
  accessKey:
    password: ''
  secretKey:
    password: ''

  ## Default MinIO buckets
  ##
  defaultBuckets: 'thanos'
