Server: Reload TLS certs without a server restart (#83589)

* server: reload of grafana server certs when renewed without restart.

Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>

* server: reload of grafana server certs when renewed without restart.

Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>

* Update http_server.go

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update http_server.go

Address the comments

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Dan Cech <dan@aussiedan.com>

* Update http_server.go

Align the spaces

* Update http_server.go

* Update http_server.go

* Update pkg/api/http_server.go

Co-authored-by: Dan Cech <dan@aussiedan.com>

---------

Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Dan Cech <dan@aussiedan.com>
This commit is contained in:
chalapat
2024-03-22 17:13:22 +02:00
committed by GitHub
co-authored by Christopher Moyer Dan Cech
parent 658183d792
commit 65c0669f01
7 changed files with 213 additions and 100 deletions
+10
View File
@@ -27,3 +27,13 @@ func TestHTTPServer_MetricsBasicAuth(t *testing.T) {
assert.False(t, ts.metricsEndpointBasicAuthEnabled())
})
}
func TestHTTPServer_readCertificates(t *testing.T) {
ts := &HTTPServer{
Cfg: setting.NewCfg(),
}
t.Run("ReadCertificates should return error when cert files are not configured", func(t *testing.T) {
_, err := ts.readCertificates()
assert.NotNil(t, err)
})
}