Skip to content

Commit f5937ad

Browse files
committed
Replace deprecated loki-stack with loki+promtail helm charts
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
1 parent 5274d23 commit f5937ad

File tree

5 files changed

+104
-35
lines changed

5 files changed

+104
-35
lines changed

monitoring/controllers/loki-stack/release.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

monitoring/controllers/loki-stack/kustomization.yaml renamed to monitoring/controllers/loki/kustomization.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ kind: Kustomization
33
namespace: monitoring
44
resources:
55
- repository.yaml
6-
- release.yaml
6+
- loki_release.yaml
7+
- promtail_release.yaml
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta2
2+
kind: HelmRelease
3+
metadata:
4+
name: loki
5+
spec:
6+
interval: 5m
7+
dependsOn:
8+
- name: kube-prometheus-stack
9+
chart:
10+
spec:
11+
version: "5.x"
12+
chart: loki
13+
sourceRef:
14+
kind: HelmRepository
15+
name: grafana-charts
16+
interval: 60m
17+
# https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml
18+
values:
19+
loki:
20+
auth_enabled: false
21+
serviceMonitor:
22+
enabled: true
23+
labels:
24+
app.kubernetes.io/part-of: kube-prometheus-stack
25+
commonConfig:
26+
replication_factor: 1
27+
storage:
28+
type: 'filesystem'
29+
chunk_store_config:
30+
max_look_back_period: 24h
31+
# Configure compactor
32+
compactor:
33+
shared_store: filesystem
34+
compaction_interval: 10m
35+
delete_request_cancel_period: 10m
36+
retention_enabled: true
37+
retention_delete_delay: 2h
38+
retention_delete_worker_count: 150
39+
limits_config:
40+
retention_period: 24h
41+
gateway:
42+
enabled: true
43+
singleBinary:
44+
replicas: 1
45+
# Monitoring section determines which monitoring features to enable
46+
monitoring:
47+
# Dashboards for monitoring Loki
48+
dashboards:
49+
# -- If enabled, create configmap with dashboards for monitoring Loki
50+
enabled: false
51+
selfMonitoring:
52+
enabled: false
53+
grafanaAgent:
54+
installOperator: false
55+
# The Loki canary pushes logs to and queries from this loki installation
56+
# to test that it's working correctly
57+
lokiCanary:
58+
enabled: false
59+
# -- Section for configuring optional Helm test
60+
test:
61+
enabled: false
62+
extraObjects:
63+
- apiVersion: v1
64+
kind: ConfigMap
65+
metadata:
66+
name: loki-datasource
67+
labels:
68+
app: loki
69+
chart: loki
70+
release: loki
71+
grafana_datasource: "1"
72+
app.kubernetes.io/part-of: kube-prometheus-stack
73+
data:
74+
loki-datasource.yaml: |-
75+
apiVersion: 1
76+
datasources:
77+
- name: Loki
78+
type: loki
79+
access: proxy
80+
url: http://loki:{{ .Values.loki.server.http_listen_port }}
81+
version: 1
82+
isDefault: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta2
2+
kind: HelmRelease
3+
metadata:
4+
name: promtail
5+
spec:
6+
interval: 5m
7+
dependsOn:
8+
- name: kube-prometheus-stack
9+
chart:
10+
spec:
11+
version: "6.x"
12+
chart: promtail
13+
sourceRef:
14+
kind: HelmRepository
15+
name: grafana-charts
16+
interval: 60m
17+
# https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml
18+
values:
19+
test:
20+
enabled: false
File renamed without changes.

0 commit comments

Comments
 (0)