alloy
by Grafana
Grafana Alloy
About this chart
Grafana Alloy Helm chart
Helm chart for deploying Grafana Alloy to Kubernetes.
Usage
Setup Grafana chart repository
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
Install chart
To install the chart with the release name my-release:
helm install my-release grafana/alloy
This chart installs one instance of Grafana Alloy into your Kubernetes cluster
using a specific Kubernetes controller. By default, DaemonSet is used. The
controller.type value can be used to change the controller to either a
StatefulSet or Deployment.
Creating multiple installations of the Helm chart with different controllers is useful if just using the default DaemonSet isn't sufficient.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| alloy.clustering.enabled | bool | false | Deploy Alloy in a cluster to allow for load distribution. |
| alloy.clustering.name | string | "" | Name for the Alloy cluster. Used for differentiating between clusters. |
| alloy.clustering.portName | string | "http" | Name for the port used for clustering, useful if running inside an Istio Mesh |
| alloy.command | list | [] | Override the entrypoint command for the Alloy container. When set, this replaces the image's default entrypoint (the chart-provided args are still passed). Useful on Windows where the binary lives at a different path, for example ["C:\\Program Files\\GrafanaLabs\\Alloy\\alloy.exe"]. Leave empty to use the image's default entrypoint. |
| alloy.configMap.content | string | "" | Content to assign to the new ConfigMap. This is passed into tpl allowing for templating from values. |
| alloy.configMap.create | bool | true | Create a new ConfigMap for the config file. |
| alloy.configMap.key | string | nil | Key in ConfigMap to get config from. |
| alloy.configMap.name | string | nil | Name of existing ConfigMap to use. Used when create is false. |
| alloy.enableHttpServerPort | bool | true | Enables Grafana Alloy container's http server port. |
| alloy.enableReporting | bool | true | Enables sending Grafana Labs anonymous usage stats to help improve Grafana Alloy. |
| alloy.envFrom | list | [] | Maps all the keys on a ConfigMap or Secret as environment variables. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envfromsource-v1-core |
| alloy.extraArgs | list | [] | Extra args to pass to alloy run: https://grafana.com/docs/alloy/latest/reference/cli/run/ |
| alloy.extraEnv | list | [] | Extra environment variables to pass to the Alloy container. |
| alloy.extraPorts | list | [] | Extra ports to expose on the Alloy container. If service.type is NodePort, each item may set nodePort to choose the Service NodePort for that port. |
| alloy.hostAliases | list | [] | Host aliases to add to the Alloy container. |
| alloy.initialDelaySeconds | int | 10 | Initial delay for readiness probe. |
| alloy.lifecycle | object | {} | Set lifecycle hooks for the Grafana Alloy container. |
| alloy.listenAddr | string | "0.0.0.0" | Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers. |
| alloy.listenPort | int | 12345 | Port to listen for traffic on. |
| alloy.listenScheme | string | "HTTP" | Scheme is needed for readiness probes. If enabling tls in your configs, set to "HTTPS" |
| alloy.livenessProbe | object | {} | Set livenessProbe for the Grafana Alloy container. |
| alloy.mounts.dockercontainers | bool | false | Mount /var/lib/docker/containers from the host into the container for log collection. |
| alloy.mounts.extra | list | [] | Extra volume mounts to add into the Grafana Alloy container. Does not affect the watch container. |
| alloy.mounts.varlog | bool | false | Mount /var/log from the host into the container for log collection. |
| alloy.resizePolicy | list | [] | Resize policy for the Grafana Alloy container. Controls whether an in-place resize of CPU or memory restarts the container. |
| alloy.resources | object | {} | Resource requests and limits to apply to the Grafana Alloy container. |
| alloy.securityContext | object | {} | Security context to apply to the Grafana Alloy container. |
| alloy.stabilityLevel | string | "generally-available" | Minimum stability level of components and behavior to enable. Must be one of "experimental", "public-preview", or "generally-available". |
| alloy.storagePath | string | "/tmp/alloy" | Path to where Grafana Alloy stores data (for example, the Write-Ahead Log). By default, data is lost between reboots. |
| alloy.timeoutSeconds | int | 1 | Timeout for readiness probe. |
| alloy.uiPathPrefix | string | "/" | Base path where the UI is exposed. |
| configReloader.customArgs | list | [] | Override the args passed to the container. |
| configReloader.enabled | bool | true | Enables automatically reloading when the Alloy config changes. |
| configReloader.image.digest | string | "" | SHA256 digest of image to use for config reloading (either in format "sha256:XYZ" or "XYZ"). When set, will override configReloader.image.tag |
| configReloader.image.pullPolicy | string | "IfNotPresent" | Config reloader image pull policy. |
| configReloader.image.registry | string | "quay.io" | Config reloader image registry (defaults to docker.io) |
| configReloader.image.repository | string | "prometheus-operator/prometheus-config-reloader" | Repository to get config reloader image from. |
| configReloader.image.tag | string | "v0.94.2@sha256:a1897c67478bc23434534e91ad3855280771196b1daf17144db9dbcb655bef71" | Tag of image to use for config reloading. |
| configReloader.resizePolicy | list | [] | Resize policy for the config reloader container. Controls whether an in-place resize of CPU or memory restarts the container. |
| configReloader.resources | object | {"requests":{"cpu":"10m","memory":"50Mi"}} | Resource requests and limits to apply to the config reloader container. |
| configReloader.securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":65534,"runAsNonRoot":true,"runAsUser":65534,"seccompProfile":{"type":"RuntimeDefault"}} | Security context to apply to the Grafana configReloader container. |
| controller.affinity | object | {} | Affinity configuration for pods. |
| controller.autoscaling.enabled | bool | false | Creates a HorizontalPodAutoscaler for controller type deployment. Deprecated: Please use controller.autoscaling.horizontal instead |
| controller.autoscaling.horizontal | object | {"enabled":false,"externalHPA":false,"maxReplicas":5,"minReplicas":1,"scaleDown":{"policies":[],"selectPolicy":"Max","stabilizationWindowSeconds":300},"scaleUp":{"policies":[],"selectPolicy":"Max","stabilizationWindowSeconds":0},"targetCPUUtilizationPercentage":0,"targetMemoryUtilizationPercentage":80} | Configures the Horizontal Pod Autoscaler for the controller. |
| controller.autoscaling.horizontal.enabled | bool | false | Enables the Horizontal Pod Autoscaler for the controller. |
| controller.autoscaling.horizontal.externalHPA | bool | false | When true, the chart omits spec.replicas from the workload AND does NOT render its own HorizontalPodAutoscaler. Use this when an external controller (e.g. KEDA, a hand-written HPA, or another scaler) owns replicas for the Alloy workload. Mutually exclusive with horizontal.enabled. When set, all other controller.autoscaling.horizontal.* fields are ignored. Upgrade note: switching this from false to true on an existing release triggers a one-time single-cycle dip to 1 replica on the next helm upgrade (Helm removes the replicas field via {"spec":{"replicas":null}}, which Kubernetes interprets as "reset to default"). The external HPA corrects this within its next polling interval; users with minReplicaCount > 1 are restored within ~30s under KEDA defaults. Plan upgrades accordingly. |
| controller.autoscaling.horizontal.maxReplicas | int | 5 | The upper limit for the number of replicas to which the autoscaler can scale up. |
| controller.autoscaling.horizontal.minReplicas | int | 1 | The lower limit for the number of replicas to which the autoscaler can scale down. |
| controller.autoscaling.horizontal.scaleDown.policies | list | [] | List of policies to determine the scale-down behavior. |
| controller.autoscaling.horizontal.scaleDown.selectPolicy | string | "Max" | Determines which of the provided scaling-down policies to apply if multiple are specified. |
| controller.autoscaling.horizontal.scaleDown.stabilizationWindowSeconds | int | 300 | The duration that the autoscaling mechanism should look back on to make decisions about scaling down. |
| controller.autoscaling.horizontal.scaleUp.policies | list | [] | List of policies to determine the scale-up behavior. |
| controller.autoscaling.horizontal.scaleUp.selectPolicy | string | "Max" | Determines which of the provided scaling-up policies to apply if multiple are specified. |
| controller.autoscaling.horizontal.scaleUp.stabilizationWindowSeconds | int | 0 | The duration that the autoscaling mechanism should look back on to make decisions about scaling up. |
| controller.autoscaling.horizontal.targetCPUUtilizationPercentage | int | 0 | Average CPU utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting targetCPUUtilizationPercentage to 0 will disable CPU scaling. |
| controller.autoscaling.horizontal.targetMemoryUtilizationPercentage | int | 80 | Average Memory utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting targetMemoryUtilizationPercentage to 0 will disable Memory scaling. |
| controller.autoscaling.maxReplicas | int | 5 | The upper limit for the number of replicas to which the autoscaler can scale up. |
| controller.autoscaling.minReplicas | int | 1 | The lower limit for the number of replicas to which the autoscaler can scale down. |
| controller.autoscaling.scaleDown.policies | list | [] | List of policies to determine the scale-down behavior. |
| controller.autoscaling.scaleDown.selectPolicy | string | "Max" | Determines which of the provided scaling-down policies to apply if multiple are specified. |
| controller.autoscaling.scaleDown.stabilizationWindowSeconds | int | 300 | The duration that the autoscaling mechanism should look back on to make decisions about scaling down. |
| controller.autoscaling.scaleUp.policies | list | [] | List of policies to determine the scale-up behavior. |
| controller.autoscaling.scaleUp.selectPolicy | string | "Max" | Determines which of the provided scaling-up policies to apply if multiple are specified. |
| controller.autoscaling.scaleUp.stabilizationWindowSeconds | int | 0 | The duration that the autoscaling mechanism should look back on to make decisions about scaling up. |
| controller.autoscaling.targetCPUUtilizationPercentage | int | 0 | Average CPU utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting targetCPUUtilizationPercentage to 0 will disable CPU scaling. |
| controller.autoscaling.targetMemoryUtilizationPercentage | int | 80 | Average Memory utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting targetMemoryUtilizationPercentage to 0 will disable Memory scaling. |
| controller.autoscaling.vertical | object | {"enabled":false,"recommenders":[],"resourcePolicy":{"containerPolicies":[{"containerName":"alloy","controlledResources":["cpu","memory"],"controlledValues":"RequestsAndLimits","maxAllowed":{},"minAllowed":{}}]},"updatePolicy":null} | Configures the Vertical Pod Autoscaler for the controller. |
| controller.autoscaling.vertical.enabled | bool | false | Enables the Vertical Pod Autoscaler for the controller. |
| controller.autoscaling.vertical.recommenders | list | [] | List of recommenders to use for the Vertical Pod Autoscaler. Recommenders are responsible for generating recommendation for the object. List should be empty (then the default recommender will generate the recommendation) or contain exactly one recommender. |
| controller.autoscaling.vertical.resourcePolicy | object | {"containerPolicies":[{"containerName":"alloy","controlledResources":["cpu","memory"],"controlledValues":"RequestsAndLimits","maxAllowed":{},"minAllowed":{}}]} | Configures the resource policy for the Vertical Pod Autoscaler. |
| controller.autoscaling.vertical.resourcePolicy.containerPolicies | list | [{"containerName":"alloy","controlledResources":["cpu","memory"],"controlledValues":"RequestsAndLimits","maxAllowed":{},"minAllowed":{}}] | Configures the container policies for the Vertical Pod Autoscaler. |
| controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].controlledResources | list | ["cpu","memory"] | The controlled resources for the Vertical Pod Autoscaler. |
| controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].controlledValues | string | "RequestsAndLimits" | The controlled values for the Vertical Pod Autoscaler. Needs to be either RequestsOnly or RequestsAndLimits. |
| controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].maxAllowed | object | {} | The maximum allowed values for the pods. |
| controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].minAllowed | object | {} | Defines the min allowed resources for the pod |
| controller.autoscaling.vertical.updatePolicy | str |
Deploy alloy with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has alloy 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 chartalloy is pinned at v1.16.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