Skip to content

Commit

Permalink
helm: add namespace settings where missing (grafana#10713)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:
It adds the right `namespace` values for some components in the helm
chart.

**Which issue(s) this PR fixes**:
Fixes grafana#10048 

**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] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [x] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [x] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](grafana@d10549e)


I hope I did things right w.r.t. the changelog/README changes for the
helm chart. Please let me know if I did something wrong :)
  • Loading branch information
jhedev authored Sep 27, 2023
1 parent 7684226 commit df1254f
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 5 deletions.
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.23.1

- [BUGFIX] Add missing namespaces to some components

## 5.23.0

- [ENHANCEMENT] Add loki.storage.azure.connectionString to support Azure connection string
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.9.1
version: 5.23.0
version: 5.23.1
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.23.0](https://img.shields.io/badge/Version-5.23.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.1](https://img.shields.io/badge/AppVersion-2.9.1-informational?style=flat-square)
![Version: 5.23.1](https://img.shields.io/badge/Version-5.23.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.1](https://img.shields.io/badge/AppVersion-2.9.1-informational?style=flat-square)

Helm chart for Grafana Loki in simple, scalable mode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: monitoring.grafana.com/v1alpha1
kind: GrafanaAgent
metadata:
name: {{ include "loki.fullname" $ }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" $ | nindent 4 }}
{{- with .labels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: monitoring.grafana.com/v1alpha1
kind: LogsInstance
metadata:
name: {{ include "loki.fullname" $ }}
namespace: {{ $.Release.Namespace }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/monitoring/pod-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: monitoring.grafana.com/v1alpha1
kind: PodLogs
metadata:
name: {{ include "loki.fullname" $ }}
namespace: {{ $.Release.Namespace }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "loki.fullname" $ }}
namespace: {{ $.Release.Namespace }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/write/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "loki.writeFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.writeLabels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "loki.writeFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.writeLabels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.writeFullname" . }}-headless
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.writeSelectorLabels" . | nindent 4 }}
{{- with .Values.loki.serviceLabels }}
Expand Down
3 changes: 2 additions & 1 deletion production/helm/loki/templates/write/service-write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.writeFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.writeLabels" . | nindent 4 }}
{{- with .Values.loki.serviceLabels }}
Expand Down Expand Up @@ -33,4 +34,4 @@ spec:
protocol: TCP
selector:
{{- include "loki.writeSelectorLabels" . | nindent 4 }}
{{- end }}
{{- end }}
5 changes: 3 additions & 2 deletions production/helm/loki/templates/write/statefulset-write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "loki.writeFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.writeLabels" . | nindent 4 }}
app.kubernetes.io/part-of: memberlist
Expand Down Expand Up @@ -177,7 +178,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumeClaimTemplates:
- apiVersion: v1
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
Expand All @@ -197,4 +198,4 @@ spec:
{{- with .Values.write.extraVolumeClaimTemplates }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit df1254f

Please sign in to comment.