From 800739fab0169e614ab72bdc55e7cdd2ef422930 Mon Sep 17 00:00:00 2001 From: Pete Wall Date: Tue, 13 Aug 2024 13:01:00 -0500 Subject: [PATCH] Add the ability to set --cluster.name in the Helm chart (#1367) * Add the ability to set --cluster.name in the Helm chart with alloy.clustering.name Signed-off-by: Pete Wall * Update helm docs --------- Signed-off-by: Pete Wall --- operations/helm/charts/alloy/CHANGELOG.md | 4 ++++ operations/helm/charts/alloy/README.md | 1 + operations/helm/charts/alloy/templates/containers/_agent.yaml | 3 +++ operations/helm/charts/alloy/values.yaml | 3 +++ 4 files changed, 11 insertions(+) diff --git a/operations/helm/charts/alloy/CHANGELOG.md b/operations/helm/charts/alloy/CHANGELOG.md index 50b8aa0976..f59de7f064 100644 --- a/operations/helm/charts/alloy/CHANGELOG.md +++ b/operations/helm/charts/alloy/CHANGELOG.md @@ -10,6 +10,10 @@ internal API changes are not present. Unreleased ---------- +### Enhancements + +- Add the ability to set --cluster.name in the Helm chart with alloy.clustering.name. (@petewall) + 0.6.0 (2024-08-05) ------------------ diff --git a/operations/helm/charts/alloy/README.md b/operations/helm/charts/alloy/README.md index d11078109d..a3cb609ad0 100644 --- a/operations/helm/charts/alloy/README.md +++ b/operations/helm/charts/alloy/README.md @@ -34,6 +34,7 @@ useful if just using the default DaemonSet isn't sufficient. | 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.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. | diff --git a/operations/helm/charts/alloy/templates/containers/_agent.yaml b/operations/helm/charts/alloy/templates/containers/_agent.yaml index 721b84e7f3..f6d392b135 100644 --- a/operations/helm/charts/alloy/templates/containers/_agent.yaml +++ b/operations/helm/charts/alloy/templates/containers/_agent.yaml @@ -15,6 +15,9 @@ {{- if $values.clustering.enabled }} - --cluster.enabled=true - --cluster.join-addresses={{ include "alloy.fullname" . }}-cluster + {{- if $values.clustering.name }} + - --cluster.name={{ $values.clustering.name | quote }} + {{- end}} {{- end}} {{- if $values.stabilityLevel }} - --stability.level={{ $values.stabilityLevel }} diff --git a/operations/helm/charts/alloy/values.yaml b/operations/helm/charts/alloy/values.yaml index bd306fc273..ff89079402 100644 --- a/operations/helm/charts/alloy/values.yaml +++ b/operations/helm/charts/alloy/values.yaml @@ -41,6 +41,9 @@ alloy: # -- Deploy Alloy in a cluster to allow for load distribution. enabled: false + # -- Name for the Alloy cluster. Used for differentiating between clusters. + name: "" + # -- Name for the port used for clustering, useful if running inside an Istio Mesh portName: http