Skip to content

Commit 3a75202

Browse files
authored
fix: upgrade Grafana stack (#1766)
1 parent 738a5d3 commit 3a75202

File tree

148 files changed

+2973
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2973
-339
lines changed

apps.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ appsInfo:
246246
integration: APL uses Tekton to proivide pre-build pipelines using the git-clone, buildpacks and kaniko tasks to build images from source code and push the created images to Harbor.
247247
loki:
248248
title: Loki
249-
appVersion: 2.8.2
249+
appVersion: 2.9.8
250250
repo: https://github.com/grafana/loki
251251
maintainers: Grafana Labs
252252
relatedLinks:
@@ -305,7 +305,7 @@ appsInfo:
305305
integration: APL uses Sealed Secrets to provide a secure way to store Kubernetes secrets in Git repositories. Sealed Secrets can be used to store secrets in the values repository.
306306
tempo:
307307
title: Tempo
308-
appVersion: 2.1.1
308+
appVersion: 2.6.0
309309
repo: https://github.com/grafana/tempo
310310
maintainers: Grafana labs
311311
relatedLinks:

charts/loki/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: loki-distributed
33
description: Helm chart for Grafana Loki in microservices mode
44
type: application
5-
appVersion: 2.8.2
6-
version: 0.69.16
5+
appVersion: 2.9.10
6+
version: 0.79.4
77
home: https://grafana.github.io/helm-charts
88
sources:
99
- https://github.com/grafana/loki

charts/loki/README.md

+87-7
Large diffs are not rendered by default.

charts/loki/README.md.gotmpl

+15
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ helm repo add grafana https://grafana.github.io/helm-charts
2222

2323
Major version upgrades listed here indicate that there is an incompatible breaking change needing manual actions.
2424

25+
### From 0.78.x to 0.79.0
26+
Removed the hardcoded, deprecated `boltdb.shipper.compactor.working-directory` flag in the Compactor Deployment template, so that it can be set with `.Values.compactor.extraArgs` and the `compactor.working-directory` flag if necessary.
27+
28+
### From 0.74.x to 0.75.0
29+
The Index Gateway and Query Scheduler now expose the memberlist port 7946. In order to join the
30+
member list, you need to specify this in the `structuredConfig`:
31+
```yaml
32+
loki:
33+
structuredConfig:
34+
index_gateway:
35+
mode: ring
36+
query_scheduler:
37+
use_scheduler_ring: true
38+
```
39+
2540
### From 0.68.x to 0.69.0
2641
The in-memory `fifocache` has been renamed to more general `embedded_cache`, which currently doesn't have a `max_size_items` attribute.
2742
```yaml

charts/loki/templates/compactor/_helpers-compactor.tpl

+30
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,36 @@ compactor image
2929
{{- include "loki.lokiImage" $dict -}}
3030
{{- end }}
3131

32+
{{/*
33+
compactor readinessProbe
34+
*/}}
35+
{{- define "loki.compactor.readinessProbe" -}}
36+
{{- with .Values.compactor.readinessProbe }}
37+
readinessProbe:
38+
{{- toYaml . | nindent 2 }}
39+
{{- else }}
40+
{{- with .Values.loki.readinessProbe }}
41+
readinessProbe:
42+
{{- toYaml . | nindent 2 }}
43+
{{- end }}
44+
{{- end }}
45+
{{- end -}}
46+
47+
{{/*
48+
compactor livenessProbe
49+
*/}}
50+
{{- define "loki.compactor.livenessProbe" -}}
51+
{{- with .Values.compactor.livenessProbe }}
52+
livenessProbe:
53+
{{- toYaml . | nindent 2 }}
54+
{{- else }}
55+
{{- with .Values.loki.livenessProbe }}
56+
livenessProbe:
57+
{{- toYaml . | nindent 2 }}
58+
{{- end }}
59+
{{- end }}
60+
{{- end -}}
61+
3262
{{/*
3363
compactor priority class name
3464
*/}}

charts/loki/templates/compactor/deployment-compactor.yaml

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- if .Values.compactor.enabled }}
2+
{{- if eq .Values.compactor.kind "Deployment"}}
23
apiVersion: apps/v1
34
kind: Deployment
45
metadata:
@@ -43,6 +44,10 @@ spec:
4344
imagePullSecrets:
4445
{{- toYaml . | nindent 8 }}
4546
{{- end }}
47+
{{- with .Values.compactor.hostAliases }}
48+
hostAliases:
49+
{{- toYaml . | nindent 8 }}
50+
{{- end }}
4651
{{- include "loki.compactorPriorityClassName" . | nindent 6 }}
4752
securityContext:
4853
{{- toYaml .Values.loki.podSecurityContext | nindent 8 }}
@@ -56,20 +61,22 @@ spec:
5661
image: {{ include "loki.compactorImage" . }}
5762
imagePullPolicy: {{ .Values.loki.image.pullPolicy }}
5863
{{- if or .Values.loki.command .Values.compactor.command }}
59-
command:
64+
command:
6065
- {{ coalesce .Values.compactor.command .Values.loki.command | quote }}
6166
{{- end }}
6267
args:
6368
- -config.file=/etc/loki/config/config.yaml
6469
- -target=compactor
65-
- -boltdb.shipper.compactor.working-directory=/var/loki/compactor
6670
{{- with .Values.compactor.extraArgs }}
6771
{{- toYaml . | nindent 12 }}
6872
{{- end }}
6973
ports:
7074
- name: http
7175
containerPort: 3100
7276
protocol: TCP
77+
- name: grpc
78+
containerPort: 9095
79+
protocol: TCP
7380
- name: http-memberlist
7481
containerPort: 7946
7582
protocol: TCP
@@ -106,7 +113,7 @@ spec:
106113
{{- end }}
107114
{{- with .Values.compactor.affinity }}
108115
affinity:
109-
{{- toYaml . | nindent 8 }}
116+
{{- tpl . $ | nindent 8 }}
110117
{{- end }}
111118
{{- with .Values.compactor.nodeSelector }}
112119
nodeSelector:
@@ -123,6 +130,9 @@ spec:
123130
{{- if .Values.loki.existingSecretForConfig }}
124131
secret:
125132
secretName: {{ .Values.loki.existingSecretForConfig }}
133+
{{- else if .Values.loki.configAsSecret }}
134+
secret:
135+
secretName: {{ include "loki.fullname" . }}-config
126136
{{- else }}
127137
configMap:
128138
name: {{ include "loki.fullname" . }}
@@ -141,3 +151,4 @@ spec:
141151
{{- toYaml . | nindent 8 }}
142152
{{- end }}
143153
{{- end }}
154+
{{- end }}

charts/loki/templates/compactor/persistentvolumeclaim-compactor.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- if and .Values.compactor.enabled .Values.compactor.persistence.enabled }}
2+
{{- if eq .Values.compactor.kind "Deployment"}}
23
apiVersion: v1
34
kind: PersistentVolumeClaim
45
metadata:
@@ -20,3 +21,4 @@ spec:
2021
requests:
2122
storage: "{{ .Values.compactor.persistence.size }}"
2223
{{- end }}
24+
{{- end }}

charts/loki/templates/compactor/service-compactor.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ spec:
2121
port: 3100
2222
targetPort: http
2323
protocol: TCP
24+
- name: grpc
25+
port: 9095
26+
targetPort: grpc
27+
protocol: TCP
28+
{{- if .Values.compactor.appProtocol.grpc }}
29+
appProtocol: {{ .Values.compactor.appProtocol.grpc }}
30+
{{- end }}
2431
selector:
2532
{{- include "loki.selectorLabels" . | nindent 4 }}
2633
app.kubernetes.io/component: compactor

charts/loki/templates/compactor/servicemonitor-compactor.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
selector:
2626
matchLabels:
2727
{{- include "loki.compactorSelectorLabels" $ | nindent 6 }}
28+
{{- with .matchExpressions }}
29+
matchExpressions:
30+
{{- toYaml . | nindent 6 }}
31+
{{- end }}
2832
endpoints:
2933
- port: http
3034
{{- with .interval }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
{{- if .Values.compactor.enabled }}
2+
{{- if eq .Values.compactor.kind "StatefulSet"}}
3+
apiVersion: apps/v1
4+
kind: StatefulSet
5+
metadata:
6+
name: {{ include "loki.compactorFullname" . }}
7+
namespace: {{ .Release.Namespace }}
8+
labels:
9+
{{- include "loki.compactorLabels" . | nindent 4 }}
10+
app.kubernetes.io/part-of: memberlist
11+
{{- with .Values.loki.annotations }}
12+
annotations:
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
15+
spec:
16+
replicas: {{ .Values.compactor.replicas }}
17+
podManagementPolicy: Parallel
18+
updateStrategy:
19+
rollingUpdate:
20+
partition: 0
21+
serviceName: {{ include "loki.compactorFullname" . }}-headless
22+
revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }}
23+
{{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.compactor.persistence.enableStatefulSetAutoDeletePVC) }}
24+
persistentVolumeClaimRetentionPolicy:
25+
whenDeleted: {{ .Values.compactor.persistence.whenDeleted }}
26+
whenScaled: {{ .Values.compactor.persistence.whenScaled }}
27+
{{- end }}
28+
selector:
29+
matchLabels:
30+
{{- include "loki.compactorSelectorLabels" . | nindent 6 }}
31+
template:
32+
metadata:
33+
annotations:
34+
{{- include "loki.config.checksum" . | nindent 8 }}
35+
{{- with .Values.loki.podAnnotations }}
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
38+
{{- with .Values.compactor.podAnnotations }}
39+
{{- toYaml . | nindent 8 }}
40+
{{- end }}
41+
labels:
42+
{{- include "loki.compactorSelectorLabels" . | nindent 8 }}
43+
app.kubernetes.io/part-of: memberlist
44+
{{- with .Values.loki.podLabels }}
45+
{{- toYaml . | nindent 8 }}
46+
{{- end }}
47+
{{- with .Values.compactor.podLabels }}
48+
{{- toYaml . | nindent 8 }}
49+
{{- end }}
50+
spec:
51+
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
52+
{{- with .Values.compactor.topologySpreadConstraints }}
53+
topologySpreadConstraints:
54+
{{- tpl . $ | nindent 8 }}
55+
{{- end }}
56+
{{- end }}
57+
serviceAccountName: {{ include "loki.serviceAccountName" . }}
58+
{{- with .Values.imagePullSecrets }}
59+
imagePullSecrets:
60+
{{- toYaml . | nindent 8 }}
61+
{{- end }}
62+
{{- with .Values.compactor.hostAliases }}
63+
hostAliases:
64+
{{- toYaml . | nindent 8 }}
65+
{{- end }}
66+
{{- include "loki.compactorPriorityClassName" . | nindent 6 }}
67+
securityContext:
68+
{{- toYaml .Values.loki.podSecurityContext | nindent 8 }}
69+
terminationGracePeriodSeconds: {{ .Values.compactor.terminationGracePeriodSeconds }}
70+
{{- with .Values.compactor.initContainers }}
71+
initContainers:
72+
{{- toYaml . | nindent 8 }}
73+
{{- end }}
74+
containers:
75+
- name: compactor
76+
image: {{ include "loki.compactorImage" . }}
77+
imagePullPolicy: {{ .Values.loki.image.pullPolicy }}
78+
{{- if or .Values.loki.command .Values.compactor.command }}
79+
command:
80+
- {{ coalesce .Values.compactor.command .Values.loki.command | quote }}
81+
{{- end }}
82+
args:
83+
- -config.file=/etc/loki/config/config.yaml
84+
- -target=compactor
85+
{{- with .Values.compactor.extraArgs }}
86+
{{- toYaml . | nindent 12 }}
87+
{{- end }}
88+
ports:
89+
- name: http
90+
containerPort: 3100
91+
protocol: TCP
92+
- name: grpc
93+
containerPort: 9095
94+
protocol: TCP
95+
- name: http-memberlist
96+
containerPort: 7946
97+
protocol: TCP
98+
{{- with .Values.compactor.extraEnv }}
99+
env:
100+
{{- toYaml . | nindent 12 }}
101+
{{- end }}
102+
{{- with .Values.compactor.extraEnvFrom }}
103+
envFrom:
104+
{{- toYaml . | nindent 12 }}
105+
{{- end }}
106+
securityContext:
107+
{{- toYaml .Values.loki.containerSecurityContext | nindent 12 }}
108+
{{- include "loki.compactor.readinessProbe" . | nindent 10 }}
109+
{{- include "loki.compactor.livenessProbe" . | nindent 10 }}
110+
volumeMounts:
111+
- name: temp
112+
mountPath: /tmp
113+
- name: config
114+
mountPath: /etc/loki/config
115+
- name: runtime-config
116+
mountPath: /var/{{ include "loki.name" . }}-runtime
117+
- name: data
118+
mountPath: /var/loki
119+
{{- with .Values.compactor.extraVolumeMounts }}
120+
{{- toYaml . | nindent 12 }}
121+
{{- end }}
122+
{{- with .Values.compactor.resources }}
123+
resources:
124+
{{- toYaml . | nindent 12 }}
125+
{{- end }}
126+
{{- with .Values.compactor.lifecycle }}
127+
lifecycle:
128+
{{- toYaml . | nindent 12 }}
129+
{{- end }}
130+
{{- if .Values.compactor.extraContainers }}
131+
{{- toYaml .Values.compactor.extraContainers | nindent 8}}
132+
{{- end }}
133+
{{- with .Values.compactor.affinity }}
134+
affinity:
135+
{{- tpl . $ | nindent 8 }}
136+
{{- end }}
137+
{{- with .Values.compactor.nodeSelector }}
138+
nodeSelector:
139+
{{- toYaml . | nindent 8 }}
140+
{{- end }}
141+
{{- with .Values.compactor.tolerations }}
142+
tolerations:
143+
{{- toYaml . | nindent 8 }}
144+
{{- end }}
145+
volumes:
146+
- name: temp
147+
emptyDir: {}
148+
- name: config
149+
{{- if .Values.loki.existingSecretForConfig }}
150+
secret:
151+
secretName: {{ .Values.loki.existingSecretForConfig }}
152+
{{- else if .Values.loki.configAsSecret }}
153+
secret:
154+
secretName: {{ include "loki.fullname" . }}-config
155+
{{- else }}
156+
configMap:
157+
name: {{ include "loki.fullname" . }}
158+
{{- end }}
159+
- name: runtime-config
160+
configMap:
161+
name: {{ template "loki.fullname" . }}-runtime
162+
{{- if not .Values.compactor.persistence.enabled }}
163+
- name: data
164+
emptyDir: {}
165+
{{- end }}
166+
{{- with .Values.compactor.extraVolumes }}
167+
{{- toYaml . | nindent 8 }}
168+
{{- end }}
169+
{{- if .Values.compactor.persistence.enabled }}
170+
volumeClaimTemplates:
171+
{{- range .Values.compactor.persistence.claims }}
172+
- metadata:
173+
name: {{ .name }}
174+
{{- with .annotations }}
175+
annotations:
176+
{{- . | toYaml | nindent 10 }}
177+
{{- end }}
178+
spec:
179+
accessModes:
180+
- ReadWriteOnce
181+
{{- with .storageClass }}
182+
storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }}
183+
{{- end }}
184+
resources:
185+
requests:
186+
storage: {{ .size | quote }}
187+
{{- end }}
188+
{{- end }}
189+
{{- end }}
190+
{{- end }}

0 commit comments

Comments
 (0)