alloy

by Grafana

Helm chartv1.16.0App v1.22.0

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

KeyTypeDefaultDescription
alloy.clustering.enabledboolfalseDeploy Alloy in a cluster to allow for load distribution.
alloy.clustering.namestring""Name for the Alloy cluster. Used for differentiating between clusters.
alloy.clustering.portNamestring"http"Name for the port used for clustering, useful if running inside an Istio Mesh
alloy.commandlist[]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.contentstring""Content to assign to the new ConfigMap. This is passed into tpl allowing for templating from values.
alloy.configMap.createbooltrueCreate a new ConfigMap for the config file.
alloy.configMap.keystringnilKey in ConfigMap to get config from.
alloy.configMap.namestringnilName of existing ConfigMap to use. Used when create is false.
alloy.enableHttpServerPortbooltrueEnables Grafana Alloy container's http server port.
alloy.enableReportingbooltrueEnables sending Grafana Labs anonymous usage stats to help improve Grafana Alloy.
alloy.envFromlist[]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.extraArgslist[]Extra args to pass to alloy run: https://grafana.com/docs/alloy/latest/reference/cli/run/
alloy.extraEnvlist[]Extra environment variables to pass to the Alloy container.
alloy.extraPortslist[]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.hostAliaseslist[]Host aliases to add to the Alloy container.
alloy.initialDelaySecondsint10Initial delay for readiness probe.
alloy.lifecycleobject{}Set lifecycle hooks for the Grafana Alloy container.
alloy.listenAddrstring"0.0.0.0"Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers.
alloy.listenPortint12345Port to listen for traffic on.
alloy.listenSchemestring"HTTP"Scheme is needed for readiness probes. If enabling tls in your configs, set to "HTTPS"
alloy.livenessProbeobject{}Set livenessProbe for the Grafana Alloy container.
alloy.mounts.dockercontainersboolfalseMount /var/lib/docker/containers from the host into the container for log collection.
alloy.mounts.extralist[]Extra volume mounts to add into the Grafana Alloy container. Does not affect the watch container.
alloy.mounts.varlogboolfalseMount /var/log from the host into the container for log collection.
alloy.resizePolicylist[]Resize policy for the Grafana Alloy container. Controls whether an in-place resize of CPU or memory restarts the container.
alloy.resourcesobject{}Resource requests and limits to apply to the Grafana Alloy container.
alloy.securityContextobject{}Security context to apply to the Grafana Alloy container.
alloy.stabilityLevelstring"generally-available"Minimum stability level of components and behavior to enable. Must be one of "experimental", "public-preview", or "generally-available".
alloy.storagePathstring"/tmp/alloy"Path to where Grafana Alloy stores data (for example, the Write-Ahead Log). By default, data is lost between reboots.
alloy.timeoutSecondsint1Timeout for readiness probe.
alloy.uiPathPrefixstring"/"Base path where the UI is exposed.
configReloader.customArgslist[]Override the args passed to the container.
configReloader.enabledbooltrueEnables automatically reloading when the Alloy config changes.
configReloader.image.digeststring""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.pullPolicystring"IfNotPresent"Config reloader image pull policy.
configReloader.image.registrystring"quay.io"Config reloader image registry (defaults to docker.io)
configReloader.image.repositorystring"prometheus-operator/prometheus-config-reloader"Repository to get config reloader image from.
configReloader.image.tagstring"v0.94.2@sha256:a1897c67478bc23434534e91ad3855280771196b1daf17144db9dbcb655bef71"Tag of image to use for config reloading.
configReloader.resizePolicylist[]Resize policy for the config reloader container. Controls whether an in-place resize of CPU or memory restarts the container.
configReloader.resourcesobject{"requests":{"cpu":"10m","memory":"50Mi"}}Resource requests and limits to apply to the config reloader container.
configReloader.securityContextobject{"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.affinityobject{}Affinity configuration for pods.
controller.autoscaling.enabledboolfalseCreates a HorizontalPodAutoscaler for controller type deployment. Deprecated: Please use controller.autoscaling.horizontal instead
controller.autoscaling.horizontalobject{"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.enabledboolfalseEnables the Horizontal Pod Autoscaler for the controller.
controller.autoscaling.horizontal.externalHPAboolfalseWhen 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.maxReplicasint5The upper limit for the number of replicas to which the autoscaler can scale up.
controller.autoscaling.horizontal.minReplicasint1The lower limit for the number of replicas to which the autoscaler can scale down.
controller.autoscaling.horizontal.scaleDown.policieslist[]List of policies to determine the scale-down behavior.
controller.autoscaling.horizontal.scaleDown.selectPolicystring"Max"Determines which of the provided scaling-down policies to apply if multiple are specified.
controller.autoscaling.horizontal.scaleDown.stabilizationWindowSecondsint300The duration that the autoscaling mechanism should look back on to make decisions about scaling down.
controller.autoscaling.horizontal.scaleUp.policieslist[]List of policies to determine the scale-up behavior.
controller.autoscaling.horizontal.scaleUp.selectPolicystring"Max"Determines which of the provided scaling-up policies to apply if multiple are specified.
controller.autoscaling.horizontal.scaleUp.stabilizationWindowSecondsint0The duration that the autoscaling mechanism should look back on to make decisions about scaling up.
controller.autoscaling.horizontal.targetCPUUtilizationPercentageint0Average 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.targetMemoryUtilizationPercentageint80Average 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.maxReplicasint5The upper limit for the number of replicas to which the autoscaler can scale up.
controller.autoscaling.minReplicasint1The lower limit for the number of replicas to which the autoscaler can scale down.
controller.autoscaling.scaleDown.policieslist[]List of policies to determine the scale-down behavior.
controller.autoscaling.scaleDown.selectPolicystring"Max"Determines which of the provided scaling-down policies to apply if multiple are specified.
controller.autoscaling.scaleDown.stabilizationWindowSecondsint300The duration that the autoscaling mechanism should look back on to make decisions about scaling down.
controller.autoscaling.scaleUp.policieslist[]List of policies to determine the scale-up behavior.
controller.autoscaling.scaleUp.selectPolicystring"Max"Determines which of the provided scaling-up policies to apply if multiple are specified.
controller.autoscaling.scaleUp.stabilizationWindowSecondsint0The duration that the autoscaling mechanism should look back on to make decisions about scaling up.
controller.autoscaling.targetCPUUtilizationPercentageint0Average 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.targetMemoryUtilizationPercentageint80Average 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.verticalobject{"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.enabledboolfalseEnables the Vertical Pod Autoscaler for the controller.
controller.autoscaling.vertical.recommenderslist[]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.resourcePolicyobject{"containerPolicies":[{"containerName":"alloy","controlledResources":["cpu","memory"],"controlledValues":"RequestsAndLimits","maxAllowed":{},"minAllowed":{}}]}Configures the resource policy for the Vertical Pod Autoscaler.
controller.autoscaling.vertical.resourcePolicy.containerPolicieslist[{"containerName":"alloy","controlledResources":["cpu","memory"],"controlledValues":"RequestsAndLimits","maxAllowed":{},"minAllowed":{}}]Configures the container policies for the Vertical Pod Autoscaler.
controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].controlledResourceslist["cpu","memory"]The controlled resources for the Vertical Pod Autoscaler.
controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].controlledValuesstring"RequestsAndLimits"The controlled values for the Vertical Pod Autoscaler. Needs to be either RequestsOnly or RequestsAndLimits.
controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].maxAllowedobject{}The maximum allowed values for the pods.
controller.autoscaling.vertical.resourcePolicy.containerPolicies[0].minAllowedobject{}Defines the min allowed resources for the pod
controller.autoscaling.vertical.updatePolicystr

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartalloy is pinned at v1.16.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