Exemplo n.º 1
0
func describePodInServiceGroup(podNode *kubegraph.PodNode) []string {
	images := []string{}
	for _, container := range podNode.Pod.Spec.Containers {
		images = append(images, container.Image)
	}

	lines := []string{fmt.Sprintf("%s runs %s", podNode.ResourceString(), strings.Join(images, ", "))}
	return lines
}
Exemplo n.º 2
0
// NewPod returns the Pod and a set of all the NodeIDs covered by the Pod
func NewPod(g osgraph.Graph, podNode *kubegraph.PodNode) (Pod, IntSet) {
	covered := IntSet{}
	covered.Insert(podNode.ID())

	podView := Pod{}
	podView.Pod = podNode

	return podView, covered
}