If we run out of things to look at in the other map, return quickly.
Also move the equal-key case above the less-than case, since maps with
equal keys are the common case when merging.
When we know we have the only reference to a Report or Node object we
can avoid copying the data to change it. Add "Unsafe" variants of
various Merge operations which mutate the receiver, and a new Merger
which takes advantage of them.
This option gives a crude way to view the raw probe data as json in
the container logs, so that you can check exactly what it would have
sent.
We stub out the PipeClient interface with a dummy implementation in
this mode.
This will:
- Add StorageClass resource. Storage classes are mentioned
in the PVC spec. We're using storage class name from PVC spec to
add adjacency to the PVC node.
- Add square sheet shape for StorageClass.
- Add storage filter in the PODS topology.
Storage Filter will allow user to see distinct view of
stateful applications.
- Add visually distinct edge to show storage adjacency.
Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
This will
- Add Kubernetes volume resources such as PV, PVC.
- Add shapes for Kubernetes PV and PVC
- Add `Cylinder` shape for PV and `Dotted Cylinder` shape for PVC.
Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
Removed to reduce CPU and memory usage in probes.
This code was added in August 2016 so that newer probes could be used
with older apps. Since then we have adopted the stance that new apps
will accept reports from old probes but not vice-versa, on a version
change.
We modify the critbitgo library to skip creating a route object we don't use.
The weaveworks-local modification can be removed if
https://github.com/k-sone/critbitgo/pull/7 is merged.
Limiting env vars, docker&k8s labels, and weave net connection entries
to 20 is problematic because
- the truncation is arbitrary - there is a good chance that if you
care about a specific entry it won't be there
- the truncation is not consistent - different entries get truncated
at different times
- some of the rendering logic depends on specific labels, for example
namespace filtering of containers depends on the
`io.kubernetes.pod.namespace` label.
In practice, there should never be a huge number of labels, or Weave
Net connection entries. So there is no need to truncate them.
That leaves env vars. These are of limited use, so we now omit them by
default. If they are included they are included in full, so they are
actually useful.
Fixes#3127
This was causing shortcut reports to be delivered as normal reports.
This got broken in 0ecb908c22, when Report.BackwardCompatible(),
which does a Copy(), was introduced in the publishing path.
Fixes#3113.
Previously the only roundtrip test was for an empty report.
This test has fake data similar to that found in real reports.
'Metrics' does not round-trip exactly, so a DeepEqual workaround is
added for that.
Fixing a rare case that came up in a test. In order for this to cause
a problem, the data being decoded has to have entries out of order,
and have a value that is nil or omitted.
* Add topology.ReplaceNode() for efficiency
In some places AddNode() was called after adding to an existing node,
in which case the Merge() is just a waste of time.
Old probes do not report namespace topologies.
`report.upgradeNamespaces()` recontructs namespace topologies using the data available from other kubernetes resources.
Also, add a test.