Stop render package depending on probe

This dependency makes it harder to see the structure of the program,
and sometimes complicates compilation.

Mostly just changing the source of strings that are already exported
from the report package.  A few new strings have to be moved there,
plus the function `IsPauseImageName()`.
This commit is contained in:
Bryan Boreham
2019-09-15 17:03:04 +00:00
parent 4210bc76f4
commit 871751873b
23 changed files with 132 additions and 140 deletions
+10 -10
View File
@@ -224,8 +224,8 @@ var (
docker.LabelPrefix + "io.kubernetes.pod.uid": ClientPodUID,
docker.LabelPrefix + TestLabelKey1: ApplicationLabelValue1,
kubernetes.Namespace: KubernetesNamespace,
docker.ContainerState: docker.StateRunning,
docker.ContainerStateHuman: docker.StateRunning,
docker.ContainerState: report.StateRunning,
docker.ContainerStateHuman: report.StateRunning,
}).
WithTopology(report.Container).WithParents(report.MakeSets().
Add("host", report.MakeStringSet(ClientHostNodeID)).
@@ -241,8 +241,8 @@ var (
docker.ContainerID: ServerContainerID,
docker.ContainerName: ServerContainerName,
docker.ContainerHostname: ServerContainerHostname,
docker.ContainerState: docker.StateRunning,
docker.ContainerStateHuman: docker.StateRunning,
docker.ContainerState: report.StateRunning,
docker.ContainerStateHuman: report.StateRunning,
docker.ImageID: ServerContainerImageID,
report.HostNodeID: ServerHostNodeID,
docker.LabelPrefix + detailed.AmazonECSContainerNameLabel: "server",
@@ -299,9 +299,9 @@ var (
WithTopology(report.Host).WithSets(report.MakeSets().
Add(report.HostLocalNetworks, report.MakeStringSet("10.10.10.0/24")),
).WithMetrics(report.Metrics{
report.CPUUsage: ClientHostCPUMetric,
report.MemoryUsage: ClientHostMemoryMetric,
report.Load1: ClientHostLoad1Metric,
report.HostCPUUsage: ClientHostCPUMetric,
report.HostMemoryUsage: ClientHostMemoryMetric,
report.Load1: ClientHostLoad1Metric,
}),
ServerHostNodeID: report.MakeNodeWith(
@@ -313,9 +313,9 @@ var (
WithTopology(report.Host).WithSets(report.MakeSets().
Add(report.HostLocalNetworks, report.MakeStringSet("10.10.10.0/24")),
).WithMetrics(report.Metrics{
report.CPUUsage: ServerHostCPUMetric,
report.MemoryUsage: ServerHostMemoryMetric,
report.Load1: ServerHostLoad1Metric,
report.HostCPUUsage: ServerHostCPUMetric,
report.HostMemoryUsage: ServerHostMemoryMetric,
report.Load1: ServerHostLoad1Metric,
}),
},
MetadataTemplates: host.MetadataTemplates,