Skip to content

Commit

Permalink
Loki helm: Add Ingress labels for Loki gateway helm chart (#9395)
Browse files Browse the repository at this point in the history
Hello! I have small change suggestion. 
I think its too small to add documentation/changelog note, but if I
should then just say and I can add. :)

**What this PR does / why we need it**: it adds possibility to set
labels for Loki gateway Ingress.

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [x] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
  • Loading branch information
tabramczyk authored Jun 1, 2023
1 parent 7d67b63 commit 1b3f97f
Show file tree
Hide file tree
Showing 6 changed files with 20 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 @@ -1114,6 +1114,15 @@ false
<td><pre lang="json">
""
</pre>
</td>
</tr>
<tr>
<td>gateway.ingress.labels</td>
<td>object</td>
<td>Labels for the gateway ingress</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down
4 changes: 4 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ 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.6.0

- [ENHANCEMENT] Add `gateway.ingress.labels` to values and ingress-gateway in helm chart.

## 5.5.12

- [BUGFIX] Fix checksum annotation for config in single binary
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.12
version: 5.6.0
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.12](https://img.shields.io/badge/Version-5.5.12-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.6.0](https://img.shields.io/badge/Version-5.6.0-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/gateway/ingress-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ metadata:
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
{{- range $labelKey, $labelValue := .Values.gateway.ingress.labels }}
{{ $labelKey }}: {{ $labelValue | toYaml }}
{{- end }}
{{- with .Values.gateway.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,8 @@ gateway:
ingressClassName: ""
# -- Annotations for the gateway ingress
annotations: {}
# -- Labels for the gateway ingress
labels: {}
# -- Hosts configuration for the gateway ingress
hosts:
- host: gateway.loki.example.com
Expand Down

0 comments on commit 1b3f97f

Please sign in to comment.