thanos
by stevehipwell
Helm chart to install Thanos; a set of components that can be composed into a highly available metric system with unlimited storage capacity, which can be added seamlessly on top of existing Prometheus deployments.
About this chart
thanos
Helm chart to install Thanos; a set of components that can be composed into a highly available metric system with unlimited storage capacity, which can be added seamlessly on top of existing Prometheus deployments.
Homepage: https://thanos.io/
Maintainers
| Name | Url | |
|---|---|---|
| stevehipwell | [email protected] |
Source Code
- https://github.com/thanos-io/thanos
- https://github.com/thanos-io/kube-thanos
- https://github.com/stevehipwell/helm-charts/
Installing the Chart
OCI Repository
To install the chart using the recommended OCI method you can use the following command.
helm upgrade --install thanos oci://ghcr.io/stevehipwell/helm-charts/thanos --version 1.24.3
Verification
As the OCI chart release is signed by Cosign you can verify the chart before installing it by running the following command.
cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp 'https://github\.com/action-stars/helm-workflows/\.github/workflows/release\.yaml@.+' --certificate-github-workflow-repository stevehipwell/helm-charts --certificate-github-workflow-name Release ghcr.io/stevehipwell/helm-charts/thanos:1.24.3
Non-OCI Repository
Alternatively you can use the legacy non-OCI method via the following commands.
helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/
helm upgrade --install thanos stevehipwell/thanos --version 1.24.3
Values
| Key | Type | Default | Description |
|---|---|---|---|
| additionalEndpointGroups | list | [] | Additional endpoint groups external to the chart to be configured with --endpoint-group, these values can be templated (EXPERIMENTAL). |
| additionalEndpoints | list | [] | Additional endpoints external to the chart to be configured with --endpoint, these values can be templated. |
| additionalReplicaLabels | list | [] | Additional replica labels external to the chart. |
| autoGomemlimit.enabled | bool | false | If true, enable the go runtime to automatically limit memory consumption for all Thanos components by setting GOMEMLIMIT. |
| autoGomemlimit.ratio | float | nil | The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. |
| clusterDomain | string | "cluster.local" | Kubernetes cluster domain. |
| commonLabels | object | {} | Labels to add to all chart resources. |
| compact.affinity | object | {} | Affinity settings for scheduling the Compact pod. If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. |
| compact.automountServiceAccountToken | bool | nil | If the service account token should be mounted to the Compact pod, this overrides compact.serviceAccount.automountToken. |
| compact.deduplication.enabled | bool | true | If true, enable deduplication via the Compact component. |
| compact.deduplication.func | string | nil | If specified override the default deduplication function. |
| compact.enabled | bool | false | If true, create the Thanos Compact component. |
| compact.extraArgs | list | [] | Additional args for the Compact pod default container. |
| compact.extraEnv | list | [] | Additional environment variables for the Compact pod default container. |
| compact.extraVolumeMounts | list | [] | Extra volume mounts for the Compact pod default container. |
| compact.extraVolumes | list | [] | Extra volumes for the Compact pod. |
| compact.httpPort | int | 10902 | HTTP port for the Compact pod default container. |
| compact.livenessProbe | object | See values.yaml | Liveness probe configuration for the Compact pod default container. |
| compact.nodeSelector | object | {} | Node selector labels for scheduling the Compact pod. |
| compact.persistence.accessMode | string | "ReadWriteOnce" | Access mode for the Compact pod PVC. |
| compact.persistence.annotations | object | {} | Annotations to add to the Compact pod PVC. |
| compact.persistence.enabled | bool | false | If true, create a PersistentVolumeClaim for the Compact pod data. |
| compact.persistence.labels | object | {} | Labels to add to the Compact pod PVC. |
| compact.persistence.retainDeleted | bool | true | If true, retain the Compact PVC after the pod is deleted. |
| compact.persistence.retainScaled | bool | true | If true, retain the Compact PVC after the pod is scaled down. |
| compact.persistence.size | string | "8Gi" | Size for the Compact pod PVC. |
| compact.persistence.storageClass | string | "standard" | Storage class for the Compact pod PVC. |
| compact.podAnnotations | object | {} | Annotations to add to the Compact pod. |
| compact.podLabels | object | {} | Labels to add to the Compact pod. |
| compact.podSecurityContext | object | See values.yaml | Security context for the Compact pod. |
| compact.priorityClassName | string | nil | Priority class name for the Compact pod. |
| compact.readinessProbe | object | See values.yaml | Readiness probe configuration for the Compact pod default container. |
| compact.replicaDeduplication | bool | false | DEPRECATED - If true, use the penalty deduplication function optimized for HA Prometheus replicas. |
| compact.resources | object | {} | Resources for the Compact pod default container. |
| compact.securityContext | object | See values.yaml | Security context for the Compact pod default container. |
| compact.service.annotations | object | {} | Annotations to add to the Compact service. |
| compact.service.httpPort | int | 10902 | HTTP port for the Compact service. |
| compact.service.labels | object | {} | Labels to add to the Compact service. |
| compact.serviceAccount.annotations | object | {} | Annotations to add to the Compact service account. |
| compact.serviceAccount.automountToken | bool | false | Automount API credentials for the Compact service account. |
| compact.serviceAccount.create | bool | true | If true, create a new ServiceAccount for the Compact component. |
| compact.serviceAccount.labels | object | {} | Labels to add to the Compact service account. |
| compact.serviceAccount.name | string | nil | If this is set and compact.serviceAccount.create is true this will be used for the created Compact component service account name, if this is set and compact.serviceAccount.create is false then this will define an existing service account to use for the Compact component. |
| compact.terminationGracePeriodSeconds | int | nil | Termination grace period for the Compact pod; in seconds. |
| compact.tolerations | list | [] | Node taints the Compact pod will tolerate for scheduling. |
| compact.topologySpreadConstraints | list | [] | Topology spread constraints for scheduling for the Compact pod. If an explicit label selector is not provided one will be created from the pod selector labels. |
| compact.updateStrategy | object | {} | Update strategy for the Compact stateful set. |
| fullnameOverride | string | nil | Override the full name of the chart. |
| image.digest | string | nil | Optional image digest for the Thanos image. |
| image.pullPolicy | string | "IfNotPresent" | Image pull policy for the Thanos image. |
| image.repository | string | "quay.io/thanos/thanos" | Image repository for the Thanos image. |
| image.tag | string | nil | Image tag for the Thanos image; this will default to printf "v%s" .Chart.AppVersion if not set and will be omitted if set to -. |
| imagePullSecrets | list | [] | Image pull secrets. |
| logFormat | string | "logfmt" | Log format for Thanos components. |
| logLevel | string | "info" | Log level for Thanos components. |
| nameOverride | string | nil | Override the name of the chart. |
| objstoreConfig.create | bool | true | If true, create a Secret for the objstore store configuration. |
| objstoreConfig.key | string | "config" | Secret key for the objstore configuration. |
| objstoreConfig.name | string | nil | If this is set and objstoreConfig.create is true this will be used for the created secret name, if this is set and objstoreConfig.create is false then this will define an existing secret to use. |
| objstoreConfig.value | string | "type: FILESYSTEM\nconfig:\n directory: /var/thanos/store/s3" | Objstore configuration; this can either be a string or a map. The default values are not suitable for production. |
| query.additionalStores | list | [] | DEPRECATED - Additional stores to configure query with (--store), these values can be templated. Use additionalEndpoints instead. |
| query.affinity | object | {} | Affinity settings for scheduling the Query pod. If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. |
| query.automountServiceAccountToken | bool | nil | If the service account token should be mounted to the Query pod, this overrides query.serviceAccount.automountToken. |
| query.autoscaling.enabled | bool | false | If true, create a HorizontalPodAutoscaler for the Query deployment. |
| query.autoscaling.maxReplicas | int | 3 | Maximum number of Query replicas that the HPA should create. |
| query.autoscaling.minReplicas | int | 1 | Minimum number of Query replicas that the HPA should maintain. |
| query.autoscaling.targetCPUUtilizationPercentage | int | 80 | Target CPU utilisation percentage for the Query pod. |
| query.autoscaling.targetMemoryUtilizationPercentage | int | nil | Target memory utilisation percentage for the Query pod. |
| query.enableDnsDiscovery | bool | true | If true, enable DNS service discovery. |
| query.enabled | bool | true | If true, create the Query component. |
| query.extraArgs | list | [] | Additional args for the Query pod default container. |
| query.extraEnv | list | [] | Additional environment variables for the Query pod default container. |
| query.extraVolumeMounts | list | [] | Extra volume mounts for the Query pod default container. |
| query.extraVolumes | list | [] | Extra volumes for the Query pod. |
| query.grpcPort | int | 10901 | GRPC port used by the Query pod default container. |
| query.grpcRoute.annotations | object | {} | Annotations to add to the Query gRPC service GRPCRoute. |
| query.grpcRoute.enabled | bool | false | If true, create a GRPCRoute resource for the Query gRPC service. |
| query.grpcRoute.hostnames | list | See values.yaml | GRPCRoute hostnames for the Query gRPC service. |
| query.grpcRoute.labels | object | {} | Labels to add to the Query gRPC service GRPCRoute. |
| query.grpcRoute.parentRefs | list | See values.yaml | GRPCRoute parent references for the Query gRPC service. |
| query.grpcRoute.rules | list | See values.yaml | GRPCRoute rules for the Query gRPC service; if not set, a default rule routing all traffic to the gRPC service port will be created. |
| query.httpPort | int | 10902 | HTTP port used by the Query pod default container. |
| query.httpRoute.annotations | object | {} | Annotations to add to the Query service HTTPRoute. |
| query.httpRoute.enabled | bool | false | If true, create an HTTPRoute resource for the Query service. |
| query.httpRoute.hostnames | list | See values.yaml | HTTPRoute hostnames for the Query service. |
| query.httpRoute.labels | object | {} | Labels to add to the Query service HTTPRoute. |
| query.httpRoute.parentRefs | list | See values.yaml | HTTPRoute parent references for the Query service. |
| query.httpRoute.rules | list | See values.yaml | HTTPRoute rules for the Query service; if not set, a default rule routing all traffic to the HTTP service port will be created. |
| query.ingress.annotations | object | {} | Annotations to add to the Query service ingress. |
| query.ingress.enabled | bool | false | If true, create an Ingress for the Query service. |
| query.ingress.grpcHosts | list | See values.yaml | Hosts for the Query service gRPC ingress rules. |
| query.ingress.grpcPath | string | "/" | Path for the Query service gRPC ingress rules. |
| query.ingress.hosts | list | See values.yaml | Hosts for the Query service ingress. |
| query.ingress.ingressClassName | string | nil | Ingress class name for the Query service ingress. |
| query.ingress.path | string | "/" | Path for the Query service ingress. |
| query.ingress.tls | list | See values.yaml | TLS configuration for the Query service ingress. |
| query.livenessProbe | object | See values.yaml | Liveness probe configuration for the Query pod default container. |
| query.nodeSelector | object | {} | Node selector labels for scheduling the Query pod. |
| query.podAnnotations | object | {} | Annotations to add to the Query pod. |
| query.podDisruptionBudget.enabled | bool | false | If true, create a PodDisruptionBudget for the Query deployment. |
| query.podDisruptionBudget.maxUnavailable | string | nil | Maximum number of Query replicas that the PDB should allow to be unavailable. |
| query.podDisruptionBudget.minAvailable | string | nil | Minimum number of Query replicas that the PDB should require to be available. |
| query.podDisruptionBudget.unhealthyPodEvictionPolicy | string | nil | Unhealthy pod eviction policy for the Query PDB. |
| quer |
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 v1.24.3 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