mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Add node describe labels, creationTimestamp
This commit is contained in:
parent
a7f3d7d820
commit
4939c1137c
@ -501,7 +501,7 @@ __EOF__
|
||||
|
||||
kube::test::get_object_assert nodes "{{range.items}}{{.$id_field}}:{{end}}" '127.0.0.1:'
|
||||
|
||||
kube::test::describe_object_assert nodes "127.0.0.1" "Name:" "Conditions:" "Addresses:" "Capacity:" "Pods:"
|
||||
kube::test::describe_object_assert nodes "127.0.0.1" "Name:" "Labels:" "CreationTimestamp:" "Conditions:" "Addresses:" "Capacity:" "Pods:"
|
||||
|
||||
###########
|
||||
# Minions #
|
||||
|
@ -374,6 +374,8 @@ func (d *NodeDescriber) Describe(namespace, name string) (string, error) {
|
||||
func describeNode(node *api.Node, pods []api.Pod, events *api.EventList) (string, error) {
|
||||
return tabbedString(func(out io.Writer) error {
|
||||
fmt.Fprintf(out, "Name:\t%s\n", node.Name)
|
||||
fmt.Fprintf(out, "Labels:\t%s\n", formatLabels(node.Labels))
|
||||
fmt.Fprintf(out, "CreationTimestamp:\t%s\n", node.CreationTimestamp.Time.Format(time.RFC1123Z))
|
||||
if len(node.Status.Conditions) > 0 {
|
||||
fmt.Fprint(out, "Conditions:\n Type\tStatus\tLastProbeTime\tLastTransitionTime\tReason\tMessage\n")
|
||||
for _, c := range node.Status.Conditions {
|
||||
|
Loading…
Reference in New Issue
Block a user