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

Co-authored-by: J Stickler <julie.stickler@grafana.com>
pull/18528/head
SamuZad 6 months ago committed by GitHub
parent 6e72df395b
commit 833fcbce39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      docs/sources/setup/install/helm/reference.md
  2. 1
      production/helm/loki/CHANGELOG.md
  3. 4
      production/helm/loki/templates/backend/statefulset-backend.yaml
  4. 4
      production/helm/loki/values.yaml

@ -11142,6 +11142,15 @@ true
<td><pre lang="json">
"/rules"
</pre>
</td>
</tr>
<tr>
<td>sidecar.rules.folderAnnotation</td>
<td>string</td>
<td>The annotation overwriting the folder value. The annotation value can be either an absolute or a relative path. Relative paths will be relative to FOLDER. Useful for multi-tenancy setups.</td>
<td><pre lang="json">
null
</pre>
</td>
</tr>
<tr>

@ -14,6 +14,7 @@ Entries should include a reference to the pull request that introduced the chang
[//]: # (<AUTOMATED_UPDATES_LOCATOR> : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)
- [BUGFIX] Move loki-sc-rules container from first location in `containers` to second to avoid it being selected as the default for `kubectl logs` or `kubectl exec`
- [ENHANCEMENT] Add FOLDER_ANNOTATATION logic for sidecar container. [#13289](https://github.com/grafana/loki/pull/13289)
## 6.32.0

@ -149,6 +149,10 @@ spec:
{{- end }}
- name: FOLDER
value: "{{ .Values.sidecar.rules.folder }}"
{{- if .Values.sidecar.rules.folderAnnotation }}
- name: FOLDER_ANNOTATION
value: "{{ .Values.sidecar.rules.folderAnnotation }}"
{{- end }}
- name: RESOURCE
value: {{ quote .Values.sidecar.rules.resource }}
{{- if .Values.sidecar.enableUniqueFilenames }}

@ -3622,6 +3622,10 @@ sidecar:
labelValue: ""
# -- Folder into which the rules will be placed.
folder: /rules
# -- The annotation overwriting the folder value.
# The annotation value can be either an absolute or a relative path. Relative paths will be relative to FOLDER.
# Useful for multi-tenancy setups.
folderAnnotation: null
# -- Comma separated list of namespaces. If specified, the sidecar will search for config-maps/secrets inside these namespaces.
# Otherwise the namespace in which the sidecar is running will be used.
# It's also possible to specify 'ALL' to search in all namespaces.

Loading…
Cancel
Save