-
Notifications
You must be signed in to change notification settings - Fork 141
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
Proposal: Helm - Allow loading all alloy files in Alloy configuration directory #1176
Comments
this could be useful also for classic server management. One could simply have a directory to drop in files via Ansible, or package management. I was originally looking for classic |
If you're not using a helm chart, you can already do this by providing a directory path instead of a file path: https://grafana.com/docs/alloy/next/reference/cli/run/ |
I missed that, thank you for pointing it out!
12 Jul 2024 12:30:25 Piotr ***@***.***>:
…
this could be useful also for classic server management. One could simply have a directory to drop in files via Ansible, or package management. I was originally looking for classic *include dir/*.alloy* which would just literally include all the files verbatim.
If you're not using a helm chart, you can already do this by providing a directory path instead of a file path: https://grafana.com/docs/alloy/next/reference/cli/run/
—
Reply to this email directly, view it on GitHub[#1176 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ADD33ZNGV3LAPQWGO3OGN4TZL6V4BAVCNFSM6AAAAABKBPW4CCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVGI4DQOBVGA].
You are receiving this because you commented.
[Tracking image][https://github.com/notifications/beacon/ADD33ZOOS5FP6AX4NKJVXGDZL6V4BA5CNFSM6AAAAABKBPW4CCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUEUM3JE.gif]
|
I think this new option in the helm chart should ideally allow to provide a path to either a file or a folder, which will be passed to alloy run command. This way it'd be covering more potential use cases and would map nicely to alloy CLI. An even more generic option would be to override all arguments 🤔 and disable the config map. |
Hi ! |
Background
Actual Helm chart is designed to load a single .alloy file (entrypoint) from a generated or provided configMap, that could in turn import other files via module paradigm (coming from a different configmap, or any other mount volumes).
This behaviour, even with modules, makes overrides or unloading components in some clusters difficult when using a common configuration.
Proposal
Helm chart should implement this Alloy cli feature: 0b0b4a5
By loading all .alloy files in a folder, files mounted from provided configMap or other mean can then be overridden or removed by k8s operators in some environments/clusters in order to achieve greater modularity (terraform like folder loading).
This proposal is backward compatible as it is opt-in and disabled by default.
Usage example
When using Pyroscope / Loki / Tempo / etc. and pushing data to a central observability cluster, one may (should) need we basic auth on the ingress in front of distributors.
However, on some cluster (maybe the observability cluster itself), it makes little sense to send data through https over the public ingress domain. It is probably better to use in-cluster routing, talking directly to distributor or gateway (not the ingress).
The actual issue
Today it is not possible to if-else blocks in components (such as basic-auth in endpoint of pyroscope.write)
So for almost all clusters pyroscope-push.alloy is:
But for the other clusters I want to push via internal service, not over ingress, hence without auth, we need to have something like
So in these specific environments, we just have to override the pyroscope-push.alloy file, and everything will work nicely.
Detailed example of needed use case:
Common (all clusters) Helm chart values and configMap generation
Common Helm values (for most of clusters) - Jsonnet/Flux code
Specific cluster
Helm Chart code proposal
See. https://github.com/grafana/alloy/pull/1016/files
Basically, we could add a boolean flag changing the path passed to alloy run command
Container template
Values.yaml
The text was updated successfully, but these errors were encountered: