Skip to content

Commit fb6dbbf

Browse files
committed
mgr/cephadm: update grafana conf for disconnected environment
Fixes: https://tracker.ceph.com/issues/70070 Signed-off-by: Nizamudeen A <[email protected]>
1 parent 986f61c commit fb6dbbf

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@
4444
enable_login_token = false
4545
headers = Role:X-WEBAUTH-ROLE
4646
{% endif %}
47+
[analytics]
48+
check_for_updates = false
49+
reporting_enabled = false
50+
[plugins]
51+
check_for_plugin_updates = false
52+
public_key_retrieval_disabled = true

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

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,13 @@ def inline_certificate(multi_line_cert):
19071907
whitelist = 1::4
19081908
headers_encoded = false
19091909
enable_login_token = false
1910-
headers = Role:X-WEBAUTH-ROLE\n""").lstrip(), # noqa: W291
1910+
headers = Role:X-WEBAUTH-ROLE
1911+
[analytics]
1912+
check_for_updates = false
1913+
reporting_enabled = false
1914+
[plugins]
1915+
check_for_plugin_updates = false
1916+
public_key_retrieval_disabled = true""").lstrip(), # noqa: W291
19111917
"provisioning/datasources/ceph-dashboard.yml": y,
19121918
'certs/cert_file': dedent(f"""
19131919
# generated by cephadm\n{ceph_generated_cert}""").lstrip(),
@@ -2050,7 +2056,13 @@ def inline_certificate(multi_line_cert):
20502056
disable_initial_admin_creation = true
20512057
cookie_secure = true
20522058
cookie_samesite = none
2053-
allow_embedding = true\n""").lstrip(), # noqa: W291
2059+
allow_embedding = true
2060+
[analytics]
2061+
check_for_updates = false
2062+
reporting_enabled = false
2063+
[plugins]
2064+
check_for_plugin_updates = false
2065+
public_key_retrieval_disabled = true""").lstrip(), # noqa: W291
20542066
"provisioning/datasources/ceph-dashboard.yml": y,
20552067
'certs/cert_file': dedent(f"""
20562068
# generated by cephadm\n{ceph_generated_cert}""").lstrip(),
@@ -2142,7 +2154,13 @@ def test_grafana_config(self, _run_cephadm, cephadm_module: CephadmOrchestrator)
21422154
disable_initial_admin_creation = true
21432155
cookie_secure = true
21442156
cookie_samesite = none
2145-
allow_embedding = true\n""").lstrip(), # noqa: W291
2157+
allow_embedding = true
2158+
[analytics]
2159+
check_for_updates = false
2160+
reporting_enabled = false
2161+
[plugins]
2162+
check_for_plugin_updates = false
2163+
public_key_retrieval_disabled = true""").lstrip(), # noqa: W291
21462164
'provisioning/datasources/ceph-dashboard.yml': dedent("""
21472165
# This file is generated by cephadm.
21482166
apiVersion: 1
@@ -2252,7 +2270,13 @@ def test_grafana_initial_admin_pw(self, cephadm_module: CephadmOrchestrator):
22522270
' admin_password = secure\n'
22532271
' cookie_secure = true\n'
22542272
' cookie_samesite = none\n'
2255-
' allow_embedding = true\n',
2273+
' allow_embedding = true\n'
2274+
'[analytics]\n'
2275+
' check_for_updates = false\n'
2276+
' reporting_enabled = false\n'
2277+
'[plugins]\n'
2278+
' check_for_plugin_updates = false\n'
2279+
' public_key_retrieval_disabled = true',
22562280
'provisioning/datasources/ceph-dashboard.yml':
22572281
"# This file is generated by cephadm.\n"
22582282
"apiVersion: 1\n\n"
@@ -2315,7 +2339,13 @@ def test_grafana_no_anon_access(self, cephadm_module: CephadmOrchestrator):
23152339
' admin_password = secure\n'
23162340
' cookie_secure = true\n'
23172341
' cookie_samesite = none\n'
2318-
' allow_embedding = true\n',
2342+
' allow_embedding = true\n'
2343+
'[analytics]\n'
2344+
' check_for_updates = false\n'
2345+
' reporting_enabled = false\n'
2346+
'[plugins]\n'
2347+
' check_for_plugin_updates = false\n'
2348+
' public_key_retrieval_disabled = true',
23192349
'provisioning/datasources/ceph-dashboard.yml':
23202350
"# This file is generated by cephadm.\n"
23212351
"apiVersion: 1\n\n"

0 commit comments

Comments
 (0)