thanos
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
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.
TL;DR
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-release bitnami/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.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-release bitnami/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(TM) (*) │ ◀──────────┘
│ │ │ │
┌ ── ── ── ── ── ── ── ── ── ──┐ │ └───────────────┘
│┌────────────┐ ┌────────────┐│ │ ▲
││ Prometheus │─▶│ Thanos ││ ◀────────────────┘ │
││ (*) │◀─│ Sidecar (*)││ query │ inspect
│└────────────┘ └────────────┘│ metrics │ blocks
└ ── ── ── ── ── ── ── ── ── ──┘ │
┌──────────────┐
│ Thanos │
│ Bucket Web │
└──────────────┘
Note: Components marked with (*) are provided by subchart(s) (such as the Bitnami MinIOTM 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
The following tables lists the configurable parameters of the Thanos chart and their default values per section/component:
Global parameters
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | nil |
global.imagePullSecrets | Global Docker registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
global.storageClass | Global storage class for dynamic provisioning | nil |
Common parameters
| Parameter | Description | Default |
|---|---|---|
image.registry | Thanos image registry | docker.io |
image.repository | Thanos image name | bitnami/thanos |
image.tag | Thanos image tag | {TAG_NAME} |
image.pullPolicy | Thanos image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
nameOverride | String to partially override common.names.fullname | nil |
fullnameOverride | String to fully override common.names.fullname | nil |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
objstoreConfig | Objstore configuration | nil |
indexCacheConfig | Index cache configuration | nil |
bucketCacheConfig | Bucket cache configuration | nil |
existingObjstoreSecret | Name of existing secret with Objstore configuration | nil |
existingObjstoreSecretItems | List of Secret Keys and Paths | [] |
existingServiceAccount | Name for the existing service account to be shared between the components | nil |
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | nil |
Thanos Query parameters
| Parameter | Description | Default |
|---|---|---|
query.enabled | Enable/disable Thanos Query component | true |
query.logLevel | Thanos Query log level | info |
query.replicaLabel | Replica indicator(s) along which data is deduplicated | [replica] |
query.dnsDiscovery.enabled | Enable store APIs discovery via DNS | true |
query.dnsDiscovery.sidecarsService | Sidecars service name to discover them using DNS discovery | nil (evaluated as a template) |
query.dnsDiscovery.sidecarsNamespace | Sidecars namespace to discover them using DNS discovery | nil (evaluated as a template) |
query.stores | Store APIs to connect with Thanos Query | [] |
query.sdConfig | Service Discovery configuration | nil |
query.existingSDConfigmap | Name of existing ConfigMap with Ruler configuration | nil |
query.extraFlags | Extra Flags to passed to Thanos Query | [] |
query.replicaCount | Number of Thanos Query replicas to deploy | 1 |
query.strategyType | Deployment Strategy Type | RollingUpdate |
query.podAntiAffinityPreset | Thanos Query pod anti-affinity preset. Ignored if query.affinity is set. Allowed values: soft or hard | soft |
query.nodeAffinityPreset.type | Thanos Query node affinity preset type. Ignored if query.affinity is set. Allowed values: soft or hard | "" |
query.nodeAffinityPreset.key | Thanos Query node label key to match Ignored if query.affinity is set. | "" |
query.nodeAffinityPreset.values | Thanos Query node label values to match. Ignored if query.affinity is set. | [] |
query.affinity | Thanos Query affinity for pod assignment | {} (evaluated as a template) |
query.nodeSelector | Thanos Query node labels for pod assignment | {} (evaluated as a template) |
query.tolerations | Thanos Query tolerations for pod assignment | [] (evaluated as a template) |
query.priorityClassName | Controller priorityClassName | nil |
query.securityContext.enabled | Enable security context for Thanos Query pods | true |
query.securityContext.fsGroup | Group ID for the Thanos Query filesystem |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartthanos is pinned at v3.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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