Show k8s service IP in details panel (#1330)

* Show k8s service IP in details panel

* Review feedback
This commit is contained in:
Tom Wilkie
2016-04-19 13:18:46 +01:00
parent edef3551d3
commit baee925db3
2 changed files with 3 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ var (
ServiceID: {ID: ServiceID, Label: "ID", From: report.FromLatest, Priority: 1},
Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2},
ServiceCreated: {ID: ServiceCreated, Label: "Created", From: report.FromLatest, Priority: 3},
ServiceIP: {ID: ServiceIP, Label: "Internal IP", From: report.FromLatest, Priority: 4},
}
)

View File

@@ -13,6 +13,7 @@ const (
ServiceID = "kubernetes_service_id"
ServiceName = "kubernetes_service_name"
ServiceCreated = "kubernetes_service_created"
ServiceIP = "kubernetes_service_ip"
)
// Service represents a Kubernetes service
@@ -58,5 +59,6 @@ func (s *service) GetNode() report.Node {
ServiceName: s.Name(),
ServiceCreated: s.ObjectMeta.CreationTimestamp.Format(time.RFC822),
Namespace: s.Namespace(),
ServiceIP: s.Spec.ClusterIP,
})
}