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
d794becf
Commit
d794becf
authored
Aug 18, 2016
by
Avesh
Committed by
Avesh Agarwal
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix kubectl describe to display a container's resource limit env vars as
node allocatable when the limits are not set.
parent
ff9980e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
describe.go
pkg/kubectl/describe.go
+5
-1
No files found.
pkg/kubectl/describe.go
View file @
d794becf
...
@@ -949,7 +949,11 @@ func describeContainers(label string, containers []api.Container, containerStatu
...
@@ -949,7 +949,11 @@ func describeContainers(label string, containers []api.Container, containerStatu
if
err
!=
nil
{
if
err
!=
nil
{
valueFrom
=
""
valueFrom
=
""
}
}
fmt
.
Fprintf
(
out
,
" %s:
\t
%s (%s)
\n
"
,
e
.
Name
,
valueFrom
,
e
.
ValueFrom
.
ResourceFieldRef
.
Resource
)
resource
:=
e
.
ValueFrom
.
ResourceFieldRef
.
Resource
if
valueFrom
==
"0"
&&
(
resource
==
"limits.cpu"
||
resource
==
"limits.memory"
)
{
valueFrom
=
"node allocatable"
}
fmt
.
Fprintf
(
out
,
" %s:
\t
%s (%s)
\n
"
,
e
.
Name
,
valueFrom
,
resource
)
case
e
.
ValueFrom
.
SecretKeyRef
!=
nil
:
case
e
.
ValueFrom
.
SecretKeyRef
!=
nil
:
fmt
.
Fprintf
(
out
,
" %s:
\t
<set to the key '%s' in secret '%s'>
\n
"
,
e
.
Name
,
e
.
ValueFrom
.
SecretKeyRef
.
Key
,
e
.
ValueFrom
.
SecretKeyRef
.
Name
)
fmt
.
Fprintf
(
out
,
" %s:
\t
<set to the key '%s' in secret '%s'>
\n
"
,
e
.
Name
,
e
.
ValueFrom
.
SecretKeyRef
.
Key
,
e
.
ValueFrom
.
SecretKeyRef
.
Name
)
case
e
.
ValueFrom
.
ConfigMapKeyRef
!=
nil
:
case
e
.
ValueFrom
.
ConfigMapKeyRef
!=
nil
:
...
...
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