Skip to content

Commit

Permalink
Helm: Support of extraVolumeClaimTemplates for writer statefulset (#9485
Browse files Browse the repository at this point in the history
)

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

This PR adds `extraVolumeClaimTemplates` value for write loki component,
it allows to have more than one volume claims for persistent statefulset
configuration. For example, when it's needed to have ingester's and
shipper's WAL files on different persistent volumes.

**Special notes for your reviewer**:

**Checklist**
- [X] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [X] Documentation added
- [x] Tests updated
- [x] `CHANGELOG.md` updated
- [x] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

---------

Co-authored-by: J Stickler <julie.stickler@grafana.com>
  • Loading branch information
anosulchik and JStickler committed May 24, 2023
1 parent a4ef068 commit 2c57d2e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/sources/installation/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3726,6 +3726,15 @@ Hard node and soft zone anti-affinity
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>write.extraVolumeClaimTemplates</td>
<td>list</td>
<td>volumeClaimTemplates to add to StatefulSet</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
Expand Down
3 changes: 3 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ 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.)

## 5.5.4

- [CHANGE] Add extraVolumeClaimTemplates for StatefulSet of the write component.
- [CHANGE] Add clusterLabelOverride for alert label overrides.

## 5.5.3
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.8.2
version: 5.5.3
version: 5.5.4
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# loki

![Version: 5.5.3](https://img.shields.io/badge/Version-5.5.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square)
![Version: 5.5.4](https://img.shields.io/badge/Version-5.5.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square)

Helm chart for Grafana Loki in simple, scalable mode

Expand Down
3 changes: 3 additions & 0 deletions production/helm/loki/templates/write/statefulset-write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,7 @@ spec:
selector:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.write.extraVolumeClaimTemplates }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ write:
extraVolumeMounts: []
# -- Volumes to add to the write pods
extraVolumes: []
# -- volumeClaimTemplates to add to StatefulSet
extraVolumeClaimTemplates: []
# -- Resource requests and limits for the write
resources: {}
# -- Grace period to allow the write to shutdown before it is killed. Especially for the ingester,
Expand Down

0 comments on commit 2c57d2e

Please sign in to comment.