Skip to content

Commit

Permalink
Helm - allow loading all river files in a folder
Browse files Browse the repository at this point in the history
  • Loading branch information
fculpo committed Mar 4, 2024
1 parent a0f5d8a commit b571a32
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions operations/helm/charts/grafana-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ internal API changes are not present.
Unreleased
----------

### Features

- 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)

0.35.0 (2024-02-27)
-------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
image: {{ .Values.global.image.registry | default .Values.image.registry }}/{{ .Values.image.repository }}{{ include "grafana-agent.imageId" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if eq .Values.agent.mode "flow"}}
{{- if eq .Values.agent.mode "flow" }}
- run
{{- if .Values.agent.configMap.loadFolder }}
- /etc/agent/
{{- else }}
- /etc/agent/{{ include "grafana-agent.config-map.key" . }}
{{- end }}
- --storage.path={{ .Values.agent.storagePath }}
- --server.http.listen-addr={{ .Values.agent.listenAddr }}:{{ .Values.agent.listenPort }}
- --server.http.ui-path-prefix={{ .Values.agent.uiPathPrefix }}
Expand Down
6 changes: 5 additions & 1 deletion operations/helm/charts/grafana-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ agent:

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

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

0 comments on commit b571a32

Please sign in to comment.