thanos

by joaquinito2051

Helm chartv11.6.0App 0.28.1

Thanos is a highly available metrics system that can be added on top of existing Prometheus deployments, providing a global query view across all Prometheus installations.

About this chart

Thanos packaged by Bitnami

Thanos is a highly available metrics system that can be added on top of existing Prometheus deployments, providing a global query view across all Prometheus installations.

Overview of Thanos

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

helm repo add my-repo https://charts.bitnami.com/bitnami
helm install my-release my-repo/thanos

Introduction

This chart bootstraps a Thanos deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

helm repo add my-repo https://charts.bitnami.com/bitnami
helm install my-release my-repo/thanos

These commands deploy Thanos on the Kubernetes cluster with the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release chart:

helm uninstall my-release

Architecture

This charts allows you install several Thanos components, so you deploy an architecture as the one below:

                       +--------------+                  +--------------+      +--------------+
                       | Thanos       |----------------> | Thanos Store |      | Thanos       |
                       | Query        |           |      | Gateway      |      | Compactor    |
                       +--------------+           |      +--------------+      +--------------+
                   push                           |             |                     |
+--------------+   alerts   +--------------+      |             | storages            | Downsample &
| Alertmanager | <----------| Thanos       | <----|             | query metrics       | compact blocks
| (*)          |            | Ruler        |      |             |                     |
+--------------+            +--------------+      |             \/                    |
      ^                            |              |      +----------------+           |
      | push alerts                +--------------|----> | MinIO&reg; (*) | <---------+
      |                                           |      |                |
+------------------------------+                  |      +----------------+
|+------------+  +------------+|                  |             ^
|| Prometheus |->| Thanos     || <----------------+             |
|| (*)        |<-| Sidecar (*)||    query                       | inspect
|+------------+  +------------+|    metrics                     | blocks
+------------------------------+                                |
                                                         +--------------+
                                                         | Thanos       |
                                                         | Bucket Web   |
                                                         +--------------+

Note: Components marked with (*) are provided by subchart(s) (such as the Bitnami MinIO® chart) or external charts (such as the Bitnami kube-prometheus chart).

Check the section Integrate Thanos with Prometheus and Alertmanager for detailed instructions to deploy this architecture.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployArray of extra objects to deploy with the release[]

Thanos common parameters

NameDescriptionValue
image.registryThanos image registrydocker.io
image.repositoryThanos image repositorybitnami/thanos
image.tagThanos image tag (immutable tags are recommended)0.28.1-scratch-r0
image.digestThanos image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyThanos image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
objstoreConfigThe objstore configuration""
indexCacheConfigThe index cache configuration""
bucketCacheConfigThe bucket cache configuration""
existingObjstoreSecretSecret with Objstore Configuration""
existingObjstoreSecretItemsOptional item list for specifying a custom Secret key. If so, path should be objstore.yml[]
httpConfigThe https and basic auth configuration""
existingHttpConfigSecretSecret containing the HTTPS and Basic auth configuration""
https.enabledSet to true to enable HTTPS. Requires a secret containing the certificate and key.false
https.autoGeneratedCreate self-signed TLS certificates.false
https.existingSecretExisting secret containing your own server key and certificate""
https.certFilenametls.crt
https.keyFilenametls.key
https.caFilenameca.crt
https.keyTLS Key for Thanos HTTPS - ignored if existingSecret is provided""
https.certTLS Certificate for Thanos HTTPS - ignored if existingSecret is provided""
https.ca(Optional, used for client) CA Certificate for Thanos HTTPS - ignored if existingSecret is provided""
https.clientAuthTypeServer policy for client authentication using certificates. Maps to ClientAuth Policies.""
auth.basicAuthUsersObject containing : key-value pairs for each user that will have access via basic authentication{}
serviceAccount.createSpecifies whether a ServiceAccount should be createdfalse
serviceAccount.nameName of the service account to use. If not set and create is true, a name is generated using the fullname template.""
serviceAccount.automountServiceAccountTokenAutomount service account token for the server service accounttrue
serviceAccount.annotationsAnnotations for service account. Evaluated as a template. Only used if create is true.{}

Thanos Query parameters

NameDescriptionValue
query.enabledSet to true to enable Thanos Query componenttrue
query.logLevelThanos Query log levelinfo
query.logFormatThanos Query log formatlogfmt
query.replicaLabelReplica indicator(s) along which data is de-duplicated["replica"]
query.dnsDiscovery.enabledEnable store APIs discovery via DNStrue
query.dnsDiscovery.sidecarsServiceSidecars service name to discover them using DNS discovery""
query.dnsDiscovery.sidecarsNamespaceSidecars namespace to discover them using DNS discovery""
query.stores

Deploy thanos with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has thanos on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartthanos is pinned at v11.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply