Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow helm chart to load all river files in volumemount #228

Closed
fculpo opened this issue Feb 29, 2024 · 5 comments · May be fixed by #1016
Closed

Allow helm chart to load all river files in volumemount #228

fculpo opened this issue Feb 29, 2024 · 5 comments · May be fixed by #1016
Labels
enhancement New feature or request frozen-due-to-age

Comments

@fculpo
Copy link

fculpo commented Feb 29, 2024

Request

Helm chart should be able to run agent with only a folder path, hence loading all river files in the configmap (mounted as files in /etc/agent)

This is already available in the cli: grafana/agent#5228

This line could be easily changed with a value for loading a file or just a folder: https://github.com/grafana/agent/blob/b691a44b47b3d443cf9fa462190069ed5ff5b98f/operations/helm/charts/grafana-agent/templates/containers/_agent.yaml#L8

Use case

I'm trying to have a main config.river and other river files that would be loaded on the fly (a la terraform) so that any environment/cluster can add components.

Modules are not helping as they still need to be declared for loading in the main config.river. If I don't want this module in some cluster, that will lead to errors or tedious overrides.

@fculpo fculpo added the enhancement New feature or request label Feb 29, 2024
@fculpo
Copy link
Author

fculpo commented Feb 29, 2024

The use case that tricked me is the following:

Agents in most clusters have a loki.write to a central cluster with basic-auth, but I want the "telemetry" cluster to directly send to the local loki distributors.

As I cannot use if/else statement I have to "override" somehow this component for this specific cluster (removing basic-auth block)
At the moment modules are used and I overwrite the module file in the configmap via tanka so that its transparent for the agent.

Now if I only want to add faro receiver in the telemetry cluster, but still leveraging common config, I'm stuck.
I do not want to load a fake module in common config and override in the cluster tanka env

Copy link
Contributor

github-actions bot commented Apr 3, 2024

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it.
If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue.
The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!

@rfratto rfratto transferred this issue from grafana/agent Apr 11, 2024
@thampiotr
Copy link
Contributor

Hi @fculpo, thanks for opening this issue! We have recently adopted this proposal process. and since this is a user-facing change to a helm chart which we'll need to keep backwards compatible, I think it should follow it. I'm personally in favour of this feature, but we may want to agree on exactly how this feature should be exposed to users in the helm chart config. For example, I wonder if we should support loading multiple config maps, or a single config map with multiple files in it. We want to strike the right balance between flexibility and clarity of configuration. So maybe let's convert this issue into a proposal and get to consensus on the API details. 👍

@fculpo
Copy link
Author

fculpo commented Jun 28, 2024

@thampiotr just opened proposal #1176

Should we close this then ? PR too ?

@thampiotr
Copy link
Contributor

We can close them both. I'll bring the proposal up with the maintainers.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request frozen-due-to-age
Projects
None yet
2 participants