grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.35k stars 188 forks source link

Change helm charts to allow multiple configmaps to align with the cli where we can specify multiple files #980

Open stecullum opened 4 months ago

stecullum commented 4 months ago

Request

Currently the helm charts only allow us to specify a single existing configmap for alloy config

Allow us to specify multiple maps that can be used to leverage the cli where the use of multople config files is allowed

Use case

This way we can split the large config files into many and reuse any existing ones

This would also fix when configmaps get large

error: failed to create configmap: Request entity too large: limit is 3145728

GrzegorzGawlikH commented 4 months ago

There's workaround - you can create configMapGenerator - for example:

configMapGenerator:
 - name: grafana-alloy-metrics-config
    namespace: monitoring
    files:
      - nodes-metrics.alloy
      - pods-metrics.alloy
    options:
      disableNameSuffixHash: true

And then you can put it as:

values:
    alloy:
      configMap:
        create: false
        name: grafana-alloy-metrics-config
        key: .

All files with .alloy should be read by Grafana Alloy

github-actions[bot] commented 3 months ago

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!

ShapedTime commented 2 months ago

I need this feature because I want to divide my big huge config file into smaller files for better readability and maintainability. I will be forking this repo to make changes in helm chart. I'm planning to make following changes: If alloy.configMap.key is specified, nothing changes. But if it is not specified, all the files in the configmap are mounted to /etc/alloy/ directory and alloy run commands only specifies /etc/alloy/ directory as config directory instead of a specific file.