Squash of:
* We have to keep all the container hostnames until the end so we can
count how many we've filtered
* Adding tests for ContainerHostnameRenderer and PodServiceRenderer with
filters
* Because we filter on image name we need the image name before
filtering
* Alternative approach to passing decorators.
* Refactor out some of the decorator capture
* Don't memoise decorated calls to Render
* Fixing filtered counts on containers topology
Tricky, because we need the filters to be silent sometimes (when they're
in the middle), but not when they're at the top, so we take the "top"
filter's stats. However, this means we have to compose all
user-specified filters into a single Filter layer, so we can get all
stats.
There are no more Silent filters, as all filters are silent (unless they
are at the top).
Additionally, I clarified some of the filters as their usage/terminology
was inconsistent and confused. Now Filter(IsFoo, ...) *keeps* only nodes
where IsFoo is true.
* Remove individually vendored k8s.io/kubernetes/pkg/<foo>
* Vendor the whole of vendor/k8s.io/kubernetes/pkg
* Add k8s pod log control
* Tag pods with host id and include them in the host topology as children.
* adding a basic test for kubernetes.Reporter.GetLogs
Squash of:
- including children in topologies_test.go
- report.Node.Prune should prune children also
- rewrote ShortLivedInternetConnections test to express its intent
- adding tests for detail Summary rendering
Squash of:
- use detailed.Summaries to render topology nodes
- ban merging nodes of different topologies (they should be mapped)
- need to prune parents when mapping node types
- render container images by id if they have no name
- remove separate render ids and prune parents in NewDerived*
- don't render metrics/metadata for groups of nodes
- fixing up tests
- removing pending unit tests (for mapping.go, for now)
- updating experimental dir for RenderableNode removal
* Remove report.EdgeMetadata.MaxConnCountTCP, as we don't display it anywhere
* Remove hostname metadata from local end of connection. We should be using the hostnodeid
Megasquish:
[app] remove unused edge endpoint
[WIP] refactoring node details api endpoint
[WIP] plumbing the children through the rendering process
adding IDList.Remove and StringSet.Remove
[WIP] working on adding parents to detailed node renderings
WIP UI components with mock backend data for new details
grouping children by type
UI components for node details health and info
metric formatters for details panel
Column headers and links for details table
[WIP] started on rendering node metadata and metrics in the detail view
DetailedNode.LabelMajor -> DetailedNode.Label
rendering decent labels for parents of detailed nodes
render metrics onto the top-level detailed node
removing dead code
Links to relatives
metrics have a Format not Unit
Show more/less actions for tables and relatives
adjusted metric formatter
TopologyTagger should tag k8s topology nodes
make renderablenode ids more consistent, e.g. container:abcd1234
working on rendering correct summaries for each node
adding report.Node.Rank, so that merging is independent of order
rendering children and parents correctly
output child renderableNode ids, so we can link to them
add group field to metrics, so they can be grouped
Refactored details health items to prepare for grouping
add metrics to processNodeSummaries
hide summary section if there is no data for it
fixing up tests
moving detailed node rendering into a separate package
Node ID/Topology are fields not metadata
- This way I think we don't have to care about Metadata being non-commutative.
- ID and topology are still non-commutative, as I'm not sure how to sanely
merge them, but it's possible we don't care.
host memory usage is a filesize, not a percent
working on fixing some tests
adding children to hosts detail panel
- Had to redo how parents are calculated, so that children wouldn't interfere with it
- have to have the host at the end because it is non-commutative
only render links for linkable children (i.e. not unconnected processes)
resolving TODOs
fixing up lint errors
make nil a valid value for render.Children so tests are cleaner
working on backend tests
make client handle missing metrics property
Stop rendering container image nodes with process summaries/parents
fix parent link to container images
Calculate parents as a set on report.Node (except k8s)
refactoring detailed.NodeSummary stuff
removing RenderableNode.Summary*, we already track it on report.Node
working on tests
add Columns field to NodeSummaryGroup
fixing up render/topologies_test
fix children links to container images
get children of hosts rendering right
working on host renderer tests
Change container report.Node.ID to a1b2c3;<container>
The id should be globally unique, so we don't need the host id.
This lets the kubernetes probe return a container node with the pod id,
which will get merged into the real containers with other reports. The
catch is that the kubernetes api doesn't tell us which hostname the
container is running on, so we can't populate the old-style node ids.
change terminology of system pods and services
Fix kubernetes services with no selector
Fixes handling of kubernetes service, which has no pods
fix parent links for pods/services
refactor detailed metadata to include sets and latest data
fixing up host rendering tests
fleshing out tests for node metadata and metrics
don't render container pseudo-nodes as processes
Update test for id format change.
We want to be able to import test from packages like probe/endpoint, in
order to use utility functions like poll. But that causes an import
cycle with the current layout. We got around this using dot-imports so
far, but it's ugly and unnecessary: fixture can be its own package.
* Added helper for installing scope on gcloud
* Added topologies Pods and Pods-by-Service
* Uses k8s.io/kubernetes/pkg/client/cache for the client
* Filter kube-system nodes by default
* Only show the k8s topologies if we've received a non-empty k8s report
Also, 1 packet may be counted in N topologies, so you can't rely on the
sum of all packet counts across topologies having any relation to the
sampling data.
Another implicit invariant in the data model is that edges are always of the
form (local -> remote). That is, the source of an edge must always be a node
that originates from within Scope's domain of visibility. This was evident by
the presence of ingress and egress fields in edge/aggregate metadata.
When building the sniffer, I accidentally and incorrectly violated this
invariant, by constructing distinct edges for (local -> remote) and (remote ->
local), and collapsing ingress and egress byte counts to a single scalar. I
experienced a variety of subtle undefined behavior as a result. See #339.
This change reverts to the old, correct methodology. Consequently the sniffer
needs to be able to find out which side of the sniffed packet is local v.
remote, and to do that it needs access to local networks. I moved the
discovery from the probe/host package into probe/main.go.
As part of that work I discovered that package report also maintains its own,
independent "cache" of local networks. Except it contains only the (optional)
Docker bridge network, if it's been populated by the probe, and it's only used
by the report.Make{Endpoint,Address}NodeID constructors to scope local
addresses. Normally, scoping happens during rendering, and only for pseudo
nodes -- see current LeafMap Render localNetworks. This is pretty convoluted
and should be either be made consistent or heavily commented.