mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Remove redundant kubernetes ID
This commit is contained in:
@@ -330,7 +330,6 @@ func TestMakeDetailedPodNode(t *testing.T) {
|
||||
Linkable: true,
|
||||
Pseudo: false,
|
||||
Metadata: []report.MetadataRow{
|
||||
{ID: "kubernetes_id", Label: "ID", Value: "ping/pong-b", Priority: 1},
|
||||
{ID: "kubernetes_state", Label: "State", Value: "running", Priority: 2},
|
||||
{ID: "container", Label: "# Containers", Value: "1", Priority: 4, Datatype: "number"},
|
||||
{ID: "kubernetes_namespace", Label: "Namespace", Value: "ping", Priority: 5},
|
||||
|
||||
@@ -243,8 +243,8 @@ func containerImageNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bo
|
||||
|
||||
func podNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
|
||||
base.Label, _ = n.Latest.Lookup(kubernetes.Name)
|
||||
base.Rank, _ = n.Latest.Lookup(kubernetes.ID)
|
||||
|
||||
namespace, _ := n.Latest.Lookup(kubernetes.Namespace)
|
||||
base.Rank = namespace + "/" + base.Label
|
||||
if c, ok := n.Counters.Lookup(report.Container); ok {
|
||||
if c == 1 {
|
||||
base.LabelMinor = fmt.Sprintf("%d container", c)
|
||||
@@ -258,7 +258,8 @@ func podNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
|
||||
|
||||
func serviceNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
|
||||
base.Label, _ = n.Latest.Lookup(kubernetes.Name)
|
||||
base.Rank, _ = n.Latest.Lookup(kubernetes.ID)
|
||||
namespace, _ := n.Latest.Lookup(kubernetes.Namespace)
|
||||
base.Rank = namespace + "/" + base.Label
|
||||
base.Stack = true
|
||||
|
||||
// Services are always just a group of pods, so there's no counting multiple
|
||||
@@ -276,7 +277,8 @@ func serviceNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
|
||||
|
||||
func deploymentNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
|
||||
base.Label, _ = n.Latest.Lookup(kubernetes.Name)
|
||||
base.Rank, _ = n.Latest.Lookup(kubernetes.ID)
|
||||
namespace, _ := n.Latest.Lookup(kubernetes.Namespace)
|
||||
base.Rank = namespace + "/" + base.Label
|
||||
base.Stack = true
|
||||
|
||||
if p, ok := n.Counters.Lookup(report.Pod); ok {
|
||||
@@ -292,7 +294,8 @@ func deploymentNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool)
|
||||
|
||||
func replicaSetNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
|
||||
base.Label, _ = n.Latest.Lookup(kubernetes.Name)
|
||||
base.Rank, _ = n.Latest.Lookup(kubernetes.ID)
|
||||
namespace, _ := n.Latest.Lookup(kubernetes.Namespace)
|
||||
base.Rank = namespace + "/" + base.Label
|
||||
base.Stack = true
|
||||
|
||||
if p, ok := n.Counters.Lookup(report.Pod); ok {
|
||||
|
||||
Reference in New Issue
Block a user