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
80838ff8
Commit
80838ff8
authored
Oct 18, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15454 from feihujiang/describePodsShowCommandAndArgs
Auto commit by PR queue bot
parents
5755e52b
42c38030
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
describe.go
pkg/kubectl/describe.go
+13
-0
describe_test.go
pkg/kubectl/describe_test.go
+21
-1
No files found.
pkg/kubectl/describe.go
View file @
80838ff8
...
...
@@ -725,6 +725,19 @@ func describeContainers(pod *api.Pod, out io.Writer) {
fmt
.
Fprintf
(
out
,
" Image:
\t
%s
\n
"
,
container
.
Image
)
fmt
.
Fprintf
(
out
,
" Image ID:
\t
%s
\n
"
,
status
.
ImageID
)
if
len
(
container
.
Command
)
>
0
{
fmt
.
Fprintf
(
out
,
" Command:
\n
"
)
for
_
,
c
:=
range
container
.
Command
{
fmt
.
Fprintf
(
out
,
" %s
\n
"
,
c
)
}
}
if
len
(
container
.
Args
)
>
0
{
fmt
.
Fprintf
(
out
,
" Args:
\n
"
)
for
_
,
arg
:=
range
container
.
Args
{
fmt
.
Fprintf
(
out
,
" %s
\n
"
,
arg
)
}
}
resourceToQoS
:=
qosutil
.
GetQoS
(
&
container
)
if
len
(
resourceToQoS
)
>
0
{
fmt
.
Fprintf
(
out
,
" QoS Tier:
\n
"
)
...
...
pkg/kubectl/describe_test.go
View file @
80838ff8
...
...
@@ -206,7 +206,7 @@ func TestDescribeContainers(t *testing.T) {
},
expectedElements
:
[]
string
{
"test"
,
"State"
,
"Waiting"
,
"Ready"
,
"True"
,
"Restart Count"
,
"7"
,
"Image"
,
"image"
},
},
//
e
nv
//
E
nv
{
container
:
api
.
Container
{
Name
:
"test"
,
Image
:
"image"
,
Env
:
[]
api
.
EnvVar
{{
Name
:
"envname"
,
Value
:
"xyz"
}}},
status
:
api
.
ContainerStatus
{
...
...
@@ -216,6 +216,26 @@ func TestDescribeContainers(t *testing.T) {
},
expectedElements
:
[]
string
{
"test"
,
"State"
,
"Waiting"
,
"Ready"
,
"True"
,
"Restart Count"
,
"7"
,
"Image"
,
"image"
,
"envname"
,
"xyz"
},
},
// Command
{
container
:
api
.
Container
{
Name
:
"test"
,
Image
:
"image"
,
Command
:
[]
string
{
"sleep"
,
"1000"
}},
status
:
api
.
ContainerStatus
{
Name
:
"test"
,
Ready
:
true
,
RestartCount
:
7
,
},
expectedElements
:
[]
string
{
"test"
,
"State"
,
"Waiting"
,
"Ready"
,
"True"
,
"Restart Count"
,
"7"
,
"Image"
,
"image"
,
"sleep"
,
"1000"
},
},
// Args
{
container
:
api
.
Container
{
Name
:
"test"
,
Image
:
"image"
,
Args
:
[]
string
{
"time"
,
"1000"
}},
status
:
api
.
ContainerStatus
{
Name
:
"test"
,
Ready
:
true
,
RestartCount
:
7
,
},
expectedElements
:
[]
string
{
"test"
,
"State"
,
"Waiting"
,
"Ready"
,
"True"
,
"Restart Count"
,
"7"
,
"Image"
,
"image"
,
"time"
,
"1000"
},
},
// Using limits.
{
container
:
api
.
Container
{
...
...
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