fix: filter noise nodes (0.0.0.0, reverse DNS) from map and pod dropdown

Made-with: Cursor
This commit is contained in:
taylanbakircioglu
2026-03-25 18:24:46 +03:00
parent 3a16c166ad
commit f57f9cc84f
+16 -1
View File
@@ -693,6 +693,14 @@ const isPrivateIP = (ip: string): boolean => {
return false;
};
const isNoiseNode = (name: string): boolean => {
if (!name) return false;
const trimmed = name.trim();
if (trimmed === '0.0.0.0' || trimmed.startsWith('0.0.0.0:')) return true;
if (trimmed.endsWith('.in-addr.arpa') || trimmed.endsWith('.in-addr.arpa.')) return true;
return false;
};
// Check if node is a DATACENTER node (private, outside Kubernetes cluster)
// This is for the "DataCenter" filter - shows internal datacenter dependencies
// Includes: databases, legacy systems, internal APIs, private servers
@@ -3263,7 +3271,8 @@ const MapInner: React.FC = () => {
return true;
})
.map((node: DependencyNode) => node.name)
.filter(Boolean)
.filter((name): name is string => Boolean(name) && !isNoiseNode(name))
.filter((name, idx, arr) => arr.indexOf(name) === idx)
.sort();
}, [effectiveGraphData, selectedNamespaces, selectedClusterFilter]);
@@ -3561,6 +3570,12 @@ const MapInner: React.FC = () => {
}
}
// Filter noise nodes: 0.0.0.0 bind endpoints, reverse DNS (.in-addr.arpa)
// These are listener metadata / PTR records, not real dependencies
filteredNodes = filteredNodes.filter((node: DependencyNode) =>
!isNoiseNode(node.name || '')
);
// DEBUG: Log node classification
debugLog('[CLASSIFY_DEBUG]', {
selectedNamespaces,