mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
k8s: Use 'DaemonSet', 'StatefulSet' etc instead of 'Daemon Set', 'Stateful Set'
We can't search for terms with spaces.
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user