Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f431e0e7
Commit
f431e0e7
authored
Feb 10, 2015
by
Deyuan Deng
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4274 from mikedanese/descirbe-node-condition
add NodeCondition and PodCondition to kubectl describe node/pod
parents
6c15604c
dac5e9b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
describe.go
pkg/kubectl/describe.go
+20
-0
No files found.
pkg/kubectl/describe.go
View file @
f431e0e7
...
@@ -193,6 +193,14 @@ func (d *PodDescriber) Describe(namespace, name string) (string, error) {
...
@@ -193,6 +193,14 @@ func (d *PodDescriber) Describe(namespace, name string) (string, error) {
fmt
.
Fprintf
(
out
,
"Labels:
\t
%s
\n
"
,
formatLabels
(
pod
.
Labels
))
fmt
.
Fprintf
(
out
,
"Labels:
\t
%s
\n
"
,
formatLabels
(
pod
.
Labels
))
fmt
.
Fprintf
(
out
,
"Status:
\t
%s
\n
"
,
string
(
pod
.
Status
.
Phase
))
fmt
.
Fprintf
(
out
,
"Status:
\t
%s
\n
"
,
string
(
pod
.
Status
.
Phase
))
fmt
.
Fprintf
(
out
,
"Replication Controllers:
\t
%s
\n
"
,
getReplicationControllersForLabels
(
rc
,
labels
.
Set
(
pod
.
Labels
)))
fmt
.
Fprintf
(
out
,
"Replication Controllers:
\t
%s
\n
"
,
getReplicationControllersForLabels
(
rc
,
labels
.
Set
(
pod
.
Labels
)))
if
len
(
pod
.
Status
.
Conditions
)
>
0
{
fmt
.
Fprint
(
out
,
"Conditions:
\n
Kind
\t
Status
\n
"
)
for
_
,
c
:=
range
pod
.
Status
.
Conditions
{
fmt
.
Fprintf
(
out
,
" %v
\t
%v
\n
"
,
c
.
Kind
,
c
.
Status
)
}
}
if
events
!=
nil
{
if
events
!=
nil
{
describeEvents
(
events
,
out
)
describeEvents
(
events
,
out
)
}
}
...
@@ -285,6 +293,18 @@ func (d *MinionDescriber) Describe(namespace, name string) (string, error) {
...
@@ -285,6 +293,18 @@ func (d *MinionDescriber) Describe(namespace, name string) (string, error) {
return
tabbedString
(
func
(
out
io
.
Writer
)
error
{
return
tabbedString
(
func
(
out
io
.
Writer
)
error
{
fmt
.
Fprintf
(
out
,
"Name:
\t
%s
\n
"
,
minion
.
Name
)
fmt
.
Fprintf
(
out
,
"Name:
\t
%s
\n
"
,
minion
.
Name
)
if
len
(
minion
.
Status
.
Conditions
)
>
0
{
fmt
.
Fprint
(
out
,
"Conditions:
\n
Kind
\t
Status
\t
LastProbeTime
\t
LastTransitionTime
\t
Reason
\t
Message
\n
"
)
for
_
,
c
:=
range
minion
.
Status
.
Conditions
{
fmt
.
Fprintf
(
out
,
" %v
\t
%v
\t
%s
\t
%s
\t
%v
\t
%v
\n
"
,
c
.
Kind
,
c
.
Status
,
c
.
LastProbeTime
.
Time
.
Format
(
time
.
RFC1123Z
),
c
.
LastTransitionTime
.
Time
.
Format
(
time
.
RFC1123Z
),
c
.
Reason
,
c
.
Message
)
}
}
if
events
!=
nil
{
if
events
!=
nil
{
describeEvents
(
events
,
out
)
describeEvents
(
events
,
out
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment