Skip to content

Commit

Permalink
fix: service-prometheus duplicated config, issue #647
Browse files Browse the repository at this point in the history
(cherry picked from commit bf8f527)
  • Loading branch information
DeveloperJim committed Nov 24, 2020
1 parent 25ae023 commit d229257
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (s *serviceEndpoint) getPrometheusConfigs() []*types.PrometheusSdConfig {
for _, cPort := range endpoint.Ports {
_, ok := s.cPorts[cPort.Name]
if !ok {
blog.V(3).Infof("BcsEndpoint(%s) endpoint(%s) port(%s) don't matched, and continue",
blog.V(5).Infof("BcsEndpoint(%s) endpoint(%s) port(%s) don't matched, and continue",
bcsEndpoint.GetUuid(), endpoint.ContainerIP, cPort.Name)
continue
}
Expand All @@ -108,9 +108,8 @@ func (s *serviceEndpoint) getPrometheusConfigs() []*types.PrometheusSdConfig {
conf.Targets = append(conf.Targets, fmt.Sprintf("%s:%d", endpoint.ContainerIP, cPort.ContainerPort))
}
}

promConfigs = append(promConfigs, conf)
}
promConfigs = append(promConfigs, conf)
}

return promConfigs
Expand Down

0 comments on commit d229257

Please sign in to comment.