[Helm] Add the ability to add extraObjects (#8004)

**What this PR does / why we need it**:

Add the ability to create extraObjects in helm chart. This'll allow
users to inject a configmap of loki rules or secrets for object
storages. Also, the `extraObjects` is also a common fields for helm
charts (i.e.
https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml#L1148)
pull/8095/head helm-loki-3.8.2
Xinbin Huang 2 years ago committed by GitHub
parent 2e5622bd3d
commit 7524c4b3dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      docs/sources/installation/helm/reference.md
  2. 4
      production/helm/loki/CHANGELOG.md
  3. 2
      production/helm/loki/Chart.yaml
  4. 2
      production/helm/loki/README.md
  5. 4
      production/helm/loki/templates/extra-manifests.yaml
  6. 21
      production/helm/loki/values.yaml

@ -470,6 +470,15 @@ false
<td><pre lang="json">
"v1.6.0"
</pre>
</td>
</tr>
<tr>
<td>extraObjects</td>
<td>list</td>
<td></td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>

@ -11,6 +11,10 @@ Entries should be ordered as follows:
Entries should include a reference to the pull request that introduced the change.
## 3.8.2
- [FEATURE] Added `extraObjects` helm values to extra manifests.
## 3.8.1
- [ENHANCEMENT] Add the ability to specify container lifecycle

@ -4,7 +4,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.7.0
version: 3.8.1
version: 3.8.2
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki

@ -1,6 +1,6 @@
# loki
![Version: 3.8.1](https://img.shields.io/badge/Version-3.8.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.0](https://img.shields.io/badge/AppVersion-2.7.0-informational?style=flat-square)
![Version: 3.8.2](https://img.shields.io/badge/Version-3.8.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.0](https://img.shields.io/badge/AppVersion-2.7.0-informational?style=flat-square)
Helm chart for Grafana Loki in simple, scalable mode

@ -0,0 +1,4 @@
{{ range .Values.extraObjects }}
---
{{ tpl (toYaml .) $ }}
{{ end }}

@ -1304,3 +1304,24 @@ minio:
requests:
cpu: 100m
memory: 128Mi
# Create extra manifests via values. Would be passed through `tpl` for templating
extraObjects: []
# - apiVersion: v1
# kind: ConfigMap
# metadata:
# name: loki-alerting-rules
# data:
# loki-alerting-rules.yaml: |-
# groups:
# - name: example
# rules:
# - alert: example
# expr: |
# sum(count_over_time({app="loki"} |~ "error")) > 0
# for: 3m
# labels:
# severity: warning
# category: logs
# annotations:
# message: "loki has encountered errors"

Loading…
Cancel
Save