Пример #1
0
func serviceParent(n report.Node) Parent {
	return Parent{
		ID:         render.MakeServiceID(n.Metadata[kubernetes.ServiceID]),
		Label:      n.Metadata[kubernetes.ServiceName],
		TopologyID: "pods-by-service",
	}
}
Пример #2
0
func serviceParent(n report.Node) Parent {
	serviceID, _ := n.Latest.Lookup(kubernetes.ServiceID)
	serviceName, _ := n.Latest.Lookup(kubernetes.ServiceName)
	return Parent{
		ID:         render.MakeServiceID(serviceID),
		Label:      serviceName,
		TopologyID: "pods-by-service",
	}
}
Пример #3
0
			Node:         report.MakeNode().WithAdjacent(render.TheInternetID),
			EdgeMetadata: report.EdgeMetadata{},
		},
		render.TheInternetID: {
			ID:         render.TheInternetID,
			LabelMajor: render.TheInternetMajor,
			Pseudo:     true,
			Node:       report.MakeNode().WithAdjacent(ServerPodRenderedID),
			EdgeMetadata: report.EdgeMetadata{
				EgressPacketCount: newu64(60),
				EgressByteCount:   newu64(600),
			},
		},
	}).Prune()

	ServiceRenderedID = render.MakeServiceID("ping/pongservice")

	RenderedPodServices = (render.RenderableNodes{
		ServiceRenderedID: {
			ID:         ServiceRenderedID,
			LabelMajor: "pongservice",
			LabelMinor: "2 pods",
			Rank:       fixture.ServiceID,
			Pseudo:     false,
			Children: report.MakeNodeSet(
				fixture.Report.Process.Nodes[fixture.ClientProcess1NodeID],
				fixture.Report.Process.Nodes[fixture.ClientProcess2NodeID],
				fixture.Report.Container.Nodes[fixture.ClientContainerNodeID],
				fixture.Report.ContainerImage.Nodes[fixture.ClientContainerImageNodeID],
				fixture.Report.Pod.Nodes[fixture.ClientPodNodeID],
				fixture.Report.Process.Nodes[fixture.ServerProcessNodeID],