Skip to content

Commit

Permalink
Show k8s service IP in details panel (#1330)
Browse files Browse the repository at this point in the history
* Show k8s service IP in details panel

* Review feedback
  • Loading branch information
tomwilkie committed Apr 19, 2016
1 parent edef355 commit baee925
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions probe/kubernetes/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
)

Expand Down
2 changes: 2 additions & 0 deletions probe/kubernetes/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
})
}

0 comments on commit baee925

Please sign in to comment.