mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 18:51:17 +00:00
Don't scope docker IPs in Kubernetes
This commit is contained in:
@@ -298,7 +298,7 @@ func (c *container) NetworkMode() (string, bool) {
|
||||
func addScopeToIPs(hostID string, ips []string) []string {
|
||||
ipsWithScopes := []string{}
|
||||
for _, ip := range ips {
|
||||
ipsWithScopes = append(ipsWithScopes, report.MakeScopedAddressNodeID(hostID, ip))
|
||||
ipsWithScopes = append(ipsWithScopes, report.MakeAddressNodeID(hostID, ip))
|
||||
}
|
||||
return ipsWithScopes
|
||||
}
|
||||
|
||||
@@ -134,8 +134,12 @@ func probeMain(flags probeFlags) {
|
||||
p.AddTagger(probe.NewTopologyTagger(), host.NewTagger(hostID))
|
||||
|
||||
if flags.dockerEnabled {
|
||||
if err := report.AddLocalBridge(flags.dockerBridge); err != nil {
|
||||
log.Errorf("Docker: problem with bridge %s: %v", flags.dockerBridge, err)
|
||||
// Don't add the bridge in Kubernetes since container IPs are global and
|
||||
// shouldn't be scoped
|
||||
if !flags.kubernetesEnabled {
|
||||
if err := report.AddLocalBridge(flags.dockerBridge); err != nil {
|
||||
log.Errorf("Docker: problem with bridge %s: %v", flags.dockerBridge, err)
|
||||
}
|
||||
}
|
||||
if registry, err := docker.NewRegistry(flags.dockerInterval, clients, true, hostID); err == nil {
|
||||
defer registry.Stop()
|
||||
|
||||
Reference in New Issue
Block a user