mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-06 03:31:00 +00:00
refactor: remove StateDeleted from map keys
since it is a map value, not a key.
This commit is contained in:
@@ -13,10 +13,11 @@ const (
|
||||
State = report.KubernetesState
|
||||
IsInHostNetwork = report.KubernetesIsInHostNetwork
|
||||
RestartCount = report.KubernetesRestartCount
|
||||
|
||||
StateDeleted = "deleted"
|
||||
)
|
||||
|
||||
// Pod states we handle specially
|
||||
const StateDeleted = "deleted"
|
||||
|
||||
// Pod represents a Kubernetes pod
|
||||
type Pod interface {
|
||||
Meta
|
||||
|
||||
@@ -69,7 +69,6 @@ const (
|
||||
KubernetesSuspended = "kubernetes_suspended"
|
||||
KubernetesLastScheduled = "kubernetes_last_scheduled"
|
||||
KubernetesActiveJobs = "kubernetes_active_jobs"
|
||||
KubernetesStateDeleted = "deleted"
|
||||
KubernetesType = "kubernetes_type"
|
||||
KubernetesPorts = "kubernetes_ports"
|
||||
// probe/awsecs
|
||||
|
||||
@@ -454,7 +454,7 @@ func (r Report) upgradeNamespaces() Report {
|
||||
namespaces := map[string]struct{}{}
|
||||
for _, t := range []Topology{r.Pod, r.Service, r.Deployment, r.DaemonSet, r.StatefulSet, r.CronJob} {
|
||||
for _, n := range t.Nodes {
|
||||
if state, ok := n.Latest.Lookup(KubernetesState); ok && state == KubernetesStateDeleted {
|
||||
if state, ok := n.Latest.Lookup(KubernetesState); ok && state == "deleted" {
|
||||
continue
|
||||
}
|
||||
if namespace, ok := n.Latest.Lookup(KubernetesNamespace); ok {
|
||||
|
||||
Reference in New Issue
Block a user