mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-18 04:49:55 +00:00
Add an option group to Combined view to select group type (daemonset or deployment)
This is a union set, so it will be suitable even as we continue to add more node types to this view.
This commit is contained in:
@@ -322,12 +322,6 @@ func IsNotPseudo(n report.Node) bool {
|
||||
return n.Topology != Pseudo || strings.HasSuffix(n.ID, TheInternetID) || strings.HasPrefix(n.ID, ServiceNodeIDPrefix)
|
||||
}
|
||||
|
||||
// IsPseudoTopology returns true if the node is in a pseudo topology,
|
||||
// mimicing the check performed by MakeFilter() instead of the more complex check in IsNotPseudo()
|
||||
func IsPseudoTopology(n report.Node) bool {
|
||||
return n.Topology == Pseudo
|
||||
}
|
||||
|
||||
// IsNamespace checks if the node is a pod/service in the specified namespace
|
||||
func IsNamespace(namespace string) FilterFunc {
|
||||
return func(n report.Node) bool {
|
||||
@@ -347,6 +341,17 @@ func IsNamespace(namespace string) FilterFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// IsTopology checks if the node is from a particular report topology
|
||||
func IsTopology(topology string) FilterFunc {
|
||||
return func(n report.Node) bool {
|
||||
return n.Topology == topology
|
||||
}
|
||||
}
|
||||
|
||||
// IsPseudoTopology returns true if the node is in a pseudo topology,
|
||||
// mimicing the check performed by MakeFilter() instead of the more complex check in IsNotPseudo()
|
||||
var IsPseudoTopology = IsTopology(Pseudo)
|
||||
|
||||
var systemContainerNames = map[string]struct{}{
|
||||
"weavescope": {},
|
||||
"weavedns": {},
|
||||
|
||||
Reference in New Issue
Block a user