Merge pull request #4139 from choffmeister/fix/collect-metrics-if-metrics-per-host-false

Always collect metrics when --metrics-per-host=false
This commit is contained in:
Kubernetes Prow Robot 2020-08-08 12:02:19 -07:00 committed by GitHub
commit c500bd4b3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -230,8 +230,8 @@ func (sc *SocketCollector) handleMessage(msg []byte) {
}
for _, stats := range statsBatch {
if !sc.hosts.Has(stats.Host) {
klog.V(3).Infof("skiping metric for host %v that is not being served", stats.Host)
if sc.metricsPerHost && !sc.hosts.Has(stats.Host) {
klog.V(3).Infof("Skipping metric for host %v that is not being served", stats.Host)
continue
}