opentelemetry-target-allocator
OpenTelemetry Target Allocator Helm chart for Kubernetes
About this chart
OpenTelemetry Target Allocator Helm Chart
The helm chart installs OpenTelemetry Target Allocator in kubernetes cluster.
Prerequisites
- Kubernetes 1.24+
- Helm 4.0+
Add Repository (can be skipped for OCI repository)
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update
See helm repo for command documentation.
Install Chart
For HTTPS repository:
helm install opentelemetry-target-allocator open-telemetry/opentelemetry-target-allocator
For OCI repository:
helm install opentelemetry-target-allocator oci://ghcr.io/open-telemetry/opentelemetry-helm-charts/opentelemetry-target-allocator
Upgrading
See UPGRADING.md.
Configuration
Default configuration
By default this chart will deploy a Target Allocator to scan all namespaces for potential targets, finding all PodMonitor and ServiceMonitor custom resources compatible with the Prometheus Operator.
Other configuration options
The values.yaml file contains information about all other configuration options for this chart.
For more examples see Examples.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| mode | string | "deployment" | Valid values are "deployment" and "statefulset". |
| nameOverride | string | "" | nameOverride replaces the name of the chart, when this is used to construct Kubernetes object names. |
| fullnameOverride | string | "" | fullnameOverride completely replaces the generated name. |
| namespaceOverride | string | "" | Specify which namespace should be used to deploy the resources into. |
| replicaCount | int | 1 | Number of replicas for the target allocator |
| configMap.create | bool | true | Specifies whether a configMap should be created (true by default) |
| configMap.existingName | string | "" | Specifies an existing ConfigMap to be mounted to the pod The ConfigMap MUST include the configuration via a key named 'targetallocator.yaml'. If not you can additionaly set existingKey to the desired one in the configmap |
| targetAllocator.image.repository | string | "ghcr.io/open-telemetry/opentelemetry-operator/target-allocator" | The repository of the Target Allocator image |
| targetAllocator.image.tag | string | "" | The tag of the Target Allocator image, default value is the chart appVersion |
| targetAllocator.imagePullSecrets | list | [] | Secrets to attach to the respective serviceaccount to pull docker images |
| targetAllocator.serviceAccount.create | bool | true | Specifies whether a ServiceAccount should be created |
| targetAllocator.serviceAccount.name | string | "" | The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template |
| targetAllocator.serviceAccount.annotations | object | {} | Service account annotations |
| targetAllocator.config.allocation_strategy | string | "consistent-hashing" | |
| targetAllocator.config.prometheus_cr.enabled | bool | true | |
| targetAllocator.config.prometheus_cr.scrapeInterval | string | "30s" | |
| targetAllocator.config.prometheus_cr.service_monitor_selector | object | {} | An empty value means any service monitor will be accepted. |
| targetAllocator.config.prometheus_cr.pod_monitor_selector | object | {} | An empty value means any pod monitor will be accepted. |
| targetAllocator.config.filter_strategy | string | "relabel-config" | |
| targetAllocator.config.config.scrape_configs | list | [] | |
| targetAllocator.resources | object | {} | Resource requests and limits for the target allocator container |
| targetAllocator.livenessProbe | object | {"httpGet":{"path":"/livez","port":8080},"initialDelaySeconds":15,"periodSeconds":20} | liveness probe configuration Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| targetAllocator.readinessProbe | object | {"httpGet":{"path":"/readyz","port":8080},"initialDelaySeconds":5,"periodSeconds":10} | readiness probe configuration Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| targetAllocator.podAnnotations | object | {} | Pod annotations to add to the target allocator pod |
| targetAllocator.podLabels | object | {} | Pod labels to add to the target allocator pod |
| targetAllocator.extraEnvs | list | [] | Extra environment variables to set in the target allocator container. Ref: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ |
| affinity | object | {} | Affinity for the target allocator pod |
| tolerations | list | [] | Tolerations for the target allocator pod |
| nodeSelector | object | {} | Node selector for the target allocator pod |
| topologySpreadConstraints | list | [] | Topology spread constraints for the target allocator pod |
| priorityClassName | string | "" | Allows for pod scheduler prioritisation Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ |
| statefulset.volumeClaimTemplates | list | [] | volumeClaimTemplates for the statefulset |
| statefulset.podManagementPolicy | string | "Parallel" | Pod management policy of the StatefulSet |
| statefulset.persistentVolumeClaimRetentionPolicy | object | {"enabled":false,"whenDeleted":"Retain","whenScaled":"Retain"} | Controls if and how PVCs created by the StatefulSet are deleted. Available in Kubernetes 1.23+. |
| extraVolumes | list | [] | Extra volumes to add to the target allocator pod |
| extraVolumeMounts | list | [] | Extra volume mounts to add to the target allocator container |
| extraObjects | list | [] | This will deploy arbitrary manifests as part of the helm relase |
Deploy opentelemetry-target-allocator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has opentelemetry-target-allocator 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 chartopentelemetry-target-allocator is pinned at v0.163.1 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