grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.49k stars 3.4k forks source link

feat: add FOLDER_ANNOTATATION logic for sidecar container in loki helm chart, making multi-tenant alerting easier #13289

Open SamuZad opened 3 months ago

SamuZad commented 3 months ago

What this PR does / why we need it: The sidecar container is super convenient for adding (alerting) rules to loki.

However, as things stand, all files are mounted into the same directory, with no convenient way to separate them by tenant.

Luckily, the sidecar image already has a built-in environment variable for this, FOLDER_ANNOTATION. This PR implements the environment variable into the pod definition, in a manner consistent with other env variables within the chart.

Which issue(s) this PR fixes: Fixes #13049

Special notes for your reviewer:

Checklist

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.