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
9bed6087
Commit
9bed6087
authored
Mar 21, 2018
by
zhangxiaoyu-zidif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to scale subresource when describe hpa replicas
parent
3cf94ef1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
describe.go
pkg/printers/internalversion/describe.go
+2
-10
No files found.
pkg/printers/internalversion/describe.go
View file @
9bed6087
...
@@ -2864,17 +2864,9 @@ func describeHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, e
...
@@ -2864,17 +2864,9 @@ func describeHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, e
}
}
w
.
Write
(
LEVEL_0
,
"Min replicas:
\t
%s
\n
"
,
minReplicas
)
w
.
Write
(
LEVEL_0
,
"Min replicas:
\t
%s
\n
"
,
minReplicas
)
w
.
Write
(
LEVEL_0
,
"Max replicas:
\t
%d
\n
"
,
hpa
.
Spec
.
MaxReplicas
)
w
.
Write
(
LEVEL_0
,
"Max replicas:
\t
%d
\n
"
,
hpa
.
Spec
.
MaxReplicas
)
w
.
Write
(
LEVEL_0
,
"%s pods:
\t
"
,
hpa
.
Spec
.
ScaleTargetRef
.
Kind
)
w
.
Write
(
LEVEL_0
,
"%d current / %d desired
\n
"
,
hpa
.
Status
.
CurrentReplicas
,
hpa
.
Status
.
DesiredReplicas
)
// TODO: switch to scale subresource once the required code is submitted.
if
strings
.
ToLower
(
hpa
.
Spec
.
ScaleTargetRef
.
Kind
)
==
"replicationcontroller"
{
w
.
Write
(
LEVEL_0
,
"ReplicationController pods:
\t
"
)
rc
,
err
:=
d
.
client
.
Core
()
.
ReplicationControllers
(
hpa
.
Namespace
)
.
Get
(
hpa
.
Spec
.
ScaleTargetRef
.
Name
,
metav1
.
GetOptions
{})
if
err
==
nil
{
w
.
Write
(
LEVEL_0
,
"%d current / %d desired
\n
"
,
rc
.
Status
.
Replicas
,
rc
.
Spec
.
Replicas
)
}
else
{
w
.
Write
(
LEVEL_0
,
"failed to check Replication Controller
\n
"
)
}
}
if
len
(
hpa
.
Status
.
Conditions
)
>
0
{
if
len
(
hpa
.
Status
.
Conditions
)
>
0
{
w
.
Write
(
LEVEL_0
,
"Conditions:
\n
"
)
w
.
Write
(
LEVEL_0
,
"Conditions:
\n
"
)
w
.
Write
(
LEVEL_1
,
"Type
\t
Status
\t
Reason
\t
Message
\n
"
)
w
.
Write
(
LEVEL_1
,
"Type
\t
Status
\t
Reason
\t
Message
\n
"
)
...
...
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