mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Kubectl describe nodes id with events.
This commit is contained in:
parent
f662d7d11c
commit
688363ad53
@ -27,6 +27,7 @@ import (
|
|||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
||||||
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -366,7 +367,14 @@ func (d *NodeDescriber) Describe(namespace, name string) (string, error) {
|
|||||||
pods = append(pods, pod)
|
pods = append(pods, pod)
|
||||||
}
|
}
|
||||||
|
|
||||||
events, _ := d.Events(namespace).Search(node)
|
var events *api.EventList
|
||||||
|
if ref, err := api.GetReference(node); err != nil {
|
||||||
|
glog.Errorf("Unable to construct reference to '%#v': %v", node, err)
|
||||||
|
} else {
|
||||||
|
// TODO: We haven't decided the namespace for Node object yet.
|
||||||
|
ref.UID = types.UID(ref.Name)
|
||||||
|
events, _ = d.Events("").Search(ref)
|
||||||
|
}
|
||||||
|
|
||||||
return describeNode(node, pods, events)
|
return describeNode(node, pods, events)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user