Merge pull request #18203 from ahrtr/metrics_url_20240618

Update the error message when client certificate isn't provided for secure metrics url
This commit is contained in:
Benjamin Wang 2024-06-19 05:40:11 +01:00 committed by GitHub
commit 908d31a6fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -822,7 +822,7 @@ func (e *Etcd) pickGRPCGatewayServeContext(splitHTTP bool) *serveCtx {
panic("Expect at least one context able to serve grpc")
}
var ErrMissingClientTLSInfoForMetricsURL = errors.New("client TLS key/cert (--cert-file, --key-file) must be provided for metrics url")
var ErrMissingClientTLSInfoForMetricsURL = errors.New("client TLS key/cert (--cert-file, --key-file) must be provided for metrics secure url")
func (e *Etcd) createMetricsListener(murl url.URL) (net.Listener, error) {
tlsInfo := &e.cfg.ClientTLSInfo