Skip to content

Commit 08ff0d2

Browse files
committed
Helm - allow loading all river files in a folder
1 parent 72b08ca commit 08ff0d2

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

operations/helm/charts/grafana-agent/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ internal API changes are not present.
1010
Unreleased
1111
----------
1212

13+
### Features
14+
15+
- Agent can load all river files located in `/etc/agent` (mounted via default or user provided configMap) instead of only one. This allows increased modularity, besides modules, and a terraform like behaviour. To enable it, set `.Values.agent.configMap.loadFolder` to `true`. (@fculpo)
16+
1317
0.35.0 (2024-02-27)
1418
-------------------
1519

operations/helm/charts/grafana-agent/templates/containers/_agent.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
image: {{ .Values.global.image.registry | default .Values.image.registry }}/{{ .Values.image.repository }}{{ include "grafana-agent.imageId" . }}
44
imagePullPolicy: {{ .Values.image.pullPolicy }}
55
args:
6-
{{- if eq .Values.agent.mode "flow"}}
6+
{{- if eq .Values.agent.mode "flow" }}
77
- run
8+
{{- if .Values.agent.configMap.loadFolder }}
9+
- /etc/agent/
10+
{{- else }}
811
- /etc/agent/{{ include "grafana-agent.config-map.key" . }}
12+
{{- end }}
913
- --storage.path={{ .Values.agent.storagePath }}
1014
- --server.http.listen-addr={{ .Values.agent.listenAddr }}:{{ .Values.agent.listenPort }}
1115
- --server.http.ui-path-prefix={{ .Values.agent.uiPathPrefix }}

operations/helm/charts/grafana-agent/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ agent:
3434

3535
# -- Name of existing ConfigMap to use. Used when create is false.
3636
name: null
37-
# -- Key in ConfigMap to get config from.
37+
# -- Key in ConfigMap to get config from.
38+
# Ignored if loadFolder is true.
3839
key: null
40+
# -- If true, agent will load all files in /etc/agent (mounted via the configMap).
41+
# key will be ignored
42+
loadFolder: false
3943

4044
clustering:
4145
# -- Deploy agents in a cluster to allow for load distribution. Only

0 commit comments

Comments
 (0)