From 486bdcc796de500d6f00c44333bd8bd424b66569 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Wed, 26 Jul 2017 13:49:54 -0700 Subject: [PATCH] k8s: Use 'DaemonSet', 'StatefulSet' etc instead of 'Daemon Set', 'Stateful Set' We can't search for terms with spaces. --- probe/kubernetes/cronjob.go | 2 +- probe/kubernetes/daemonset.go | 2 +- probe/kubernetes/statefulset.go | 2 +- render/detailed/summary.go | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/probe/kubernetes/cronjob.go b/probe/kubernetes/cronjob.go index 0230f57206..a34db38efe 100644 --- a/probe/kubernetes/cronjob.go +++ b/probe/kubernetes/cronjob.go @@ -64,7 +64,7 @@ func (cj *cronJob) Selectors() ([]labels.Selector, error) { func (cj *cronJob) GetNode() report.Node { return cj.MetaNode(report.MakeCronJobNodeID(cj.UID())).WithLatests(map[string]string{ - NodeType: "Cron Job", + NodeType: "CronJob", Schedule: cj.Spec.Schedule, Suspended: fmt.Sprint(cj.Spec.Suspend != nil && *cj.Spec.Suspend), // nil -> false LastScheduled: cj.Status.LastScheduleTime.Format(time.RFC3339Nano), diff --git a/probe/kubernetes/daemonset.go b/probe/kubernetes/daemonset.go index 3a99216c19..ad6241c53a 100644 --- a/probe/kubernetes/daemonset.go +++ b/probe/kubernetes/daemonset.go @@ -48,6 +48,6 @@ func (d *daemonSet) GetNode() report.Node { DesiredReplicas: fmt.Sprint(d.Status.DesiredNumberScheduled), Replicas: fmt.Sprint(d.Status.CurrentNumberScheduled), MisscheduledReplicas: fmt.Sprint(d.Status.NumberMisscheduled), - NodeType: "Daemon Set", + NodeType: "DaemonSet", }) } diff --git a/probe/kubernetes/statefulset.go b/probe/kubernetes/statefulset.go index a60cad8220..96061c09e0 100644 --- a/probe/kubernetes/statefulset.go +++ b/probe/kubernetes/statefulset.go @@ -44,7 +44,7 @@ func (s *statefulSet) GetNode() report.Node { desiredReplicas = int(*s.Spec.Replicas) } latests := map[string]string{ - NodeType: "Stateful Set", + NodeType: "StatefulSet", DesiredReplicas: fmt.Sprint(desiredReplicas), Replicas: fmt.Sprint(s.Status.Replicas), } diff --git a/render/detailed/summary.go b/render/detailed/summary.go index dd2411d60d..de46963ccd 100644 --- a/render/detailed/summary.go +++ b/render/detailed/summary.go @@ -261,9 +261,9 @@ func podNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) { var podGroupNodeTypeName = map[string]string{ report.Deployment: "Deployment", - report.DaemonSet: "Daemon Set", - report.StatefulSet: "Stateful Set", - report.CronJob: "Cron Job", + report.DaemonSet: "DaemonSet", + report.StatefulSet: "StatefulSet", + report.CronJob: "CronJob", } func podGroupNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {