diff --git a/apis/v1beta1/config.go b/apis/v1beta1/config.go index c646647c56..07133b7048 100644 --- a/apis/v1beta1/config.go +++ b/apis/v1beta1/config.go @@ -392,11 +392,11 @@ func (s *Service) MetricsEndpoint() (string, int32, error) { return "", 0, err } - if host != "" { - defaultAddr = host + if host == "" { + host = defaultAddr } - return defaultAddr, int32(i64), nil + return host, int32(i64), nil } // ApplyDefaults inserts configuration defaults if it has not been set.