Skip to content

Commit

Permalink
k8s: Use 'DaemonSet', 'StatefulSet' etc instead of 'Daemon Set', 'Sta…
Browse files Browse the repository at this point in the history
…teful Set'

We can't search for terms with spaces.
  • Loading branch information
ekimekim committed Jul 26, 2017
1 parent 6c4efbb commit 486bdcc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion probe/kubernetes/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion probe/kubernetes/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})
}
2 changes: 1 addition & 1 deletion probe/kubernetes/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down
6 changes: 3 additions & 3 deletions render/detailed/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 486bdcc

Please sign in to comment.