Skip to content

Commit 00f5257

Browse files
committed
cephadm: change loki/promtail default image tags
This commit changes the default images for both loki and promtail containers. Also, to allow this update we need to update the configuration of loki in order to add a new storage schema configuration: ``` - from: 2024-05-03 store: tsdb object_store: filesystem schema: v13 index: prefix: index_ period: 24h ``` This is because 3.0.0 uses new structured metadata. See [1][2]. [1] https://grafana.com/docs/loki/latest/operations/storage/schema/ [2] https://grafana.com/docs/loki/latest/get-started/labels/structured-metadata/#when-to-use-structured-metadata Fixes: https://tracker.ceph.com/issues/65784 Signed-off-by: Guillaume Abrioux <[email protected]>
1 parent 6d36b0d commit 00f5257

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

src/cephadm/cephadmlib/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
DEFAULT_IMAGE_IS_MAIN = True
66
DEFAULT_IMAGE_RELEASE = 'squid'
77
DEFAULT_PROMETHEUS_IMAGE = 'quay.io/prometheus/prometheus:v2.43.0'
8-
DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:2.4.0'
9-
DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:2.4.0'
8+
DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:3.0.0'
9+
DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:3.0.0'
1010
DEFAULT_NODE_EXPORTER_IMAGE = 'quay.io/prometheus/node-exporter:v1.5.0'
1111
DEFAULT_ALERT_MANAGER_IMAGE = 'quay.io/prometheus/alertmanager:v0.25.0'
1212
DEFAULT_GRAFANA_IMAGE = 'quay.io/ceph/grafana:9.4.12'

src/pybind/mgr/cephadm/module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ def os_exit_noop(status: int) -> None:
121121
DEFAULT_PROMETHEUS_IMAGE = 'quay.io/prometheus/prometheus:v2.43.0'
122122
DEFAULT_NODE_EXPORTER_IMAGE = 'quay.io/prometheus/node-exporter:v1.5.0'
123123
DEFAULT_NVMEOF_IMAGE = 'quay.io/ceph/nvmeof:1.2.5'
124-
DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:2.4.0'
125-
DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:2.4.0'
124+
DEFAULT_LOKI_IMAGE = 'docker.io/grafana/loki:3.0.0'
125+
DEFAULT_PROMTAIL_IMAGE = 'docker.io/grafana/promtail:3.0.0'
126126
DEFAULT_ALERT_MANAGER_IMAGE = 'quay.io/prometheus/alertmanager:v0.25.0'
127127
DEFAULT_GRAFANA_IMAGE = 'quay.io/ceph/grafana:9.4.12'
128128
DEFAULT_HAPROXY_IMAGE = 'quay.io/ceph/haproxy:2.3'

src/pybind/mgr/cephadm/templates/services/loki.yml.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ schema_config:
2626
index:
2727
prefix: index_
2828
period: 24h
29+
- from: 2024-05-03
30+
store: tsdb
31+
object_store: filesystem
32+
schema: v13
33+
index:
34+
prefix: index_
35+
period: 24h

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,13 @@ def test_loki_config(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
10461046
store: boltdb-shipper
10471047
object_store: filesystem
10481048
schema: v11
1049+
index:
1050+
prefix: index_
1051+
period: 24h
1052+
- from: 2024-05-03
1053+
store: tsdb
1054+
object_store: filesystem
1055+
schema: v13
10491056
index:
10501057
prefix: index_
10511058
period: 24h""").lstrip()

0 commit comments

Comments
 (0)