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
08c973d7
Commit
08c973d7
authored
Feb 24, 2016
by
Marcin Wielgus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21760 from piosz/hpa-kubectl
Added support for HPA v1 in kubectl describe
parents
7ee767e4
3e023411
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
kubectl
contrib/completions/bash/kubectl
+1
-0
describe.go
pkg/kubectl/describe.go
+14
-7
No files found.
contrib/completions/bash/kubectl
View file @
08c973d7
...
@@ -392,6 +392,7 @@ _kubectl_describe()
...
@@ -392,6 +392,7 @@ _kubectl_describe()
must_have_one_noun+
=(
"deployment"
)
must_have_one_noun+
=(
"deployment"
)
must_have_one_noun+
=(
"endpoints"
)
must_have_one_noun+
=(
"endpoints"
)
must_have_one_noun+
=(
"horizontalpodautoscaler"
)
must_have_one_noun+
=(
"horizontalpodautoscaler"
)
must_have_one_noun+
=(
"horizontalpodautoscaler"
)
must_have_one_noun+
=(
"ingress"
)
must_have_one_noun+
=(
"ingress"
)
must_have_one_noun+
=(
"job"
)
must_have_one_noun+
=(
"job"
)
must_have_one_noun+
=(
"job"
)
must_have_one_noun+
=(
"job"
)
...
...
pkg/kubectl/describe.go
View file @
08c973d7
...
@@ -33,6 +33,7 @@ import (
...
@@ -33,6 +33,7 @@ import (
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/autoscaling"
"k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/apis/extensions"
clientset
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
clientset
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
...
@@ -90,13 +91,14 @@ func describerMap(c *client.Client) map[unversioned.GroupKind]Describer {
...
@@ -90,13 +91,14 @@ func describerMap(c *client.Client) map[unversioned.GroupKind]Describer {
api
.
Kind
(
"Endpoints"
)
:
&
EndpointsDescriber
{
c
},
api
.
Kind
(
"Endpoints"
)
:
&
EndpointsDescriber
{
c
},
api
.
Kind
(
"ConfigMap"
)
:
&
ConfigMapDescriber
{
c
},
api
.
Kind
(
"ConfigMap"
)
:
&
ConfigMapDescriber
{
c
},
extensions
.
Kind
(
"ReplicaSet"
)
:
&
ReplicaSetDescriber
{
c
},
extensions
.
Kind
(
"ReplicaSet"
)
:
&
ReplicaSetDescriber
{
c
},
extensions
.
Kind
(
"HorizontalPodAutoscaler"
)
:
&
HorizontalPodAutoscalerDescriber
{
c
},
extensions
.
Kind
(
"HorizontalPodAutoscaler"
)
:
&
HorizontalPodAutoscalerDescriber
{
c
},
extensions
.
Kind
(
"DaemonSet"
)
:
&
DaemonSetDescriber
{
c
},
autoscaling
.
Kind
(
"HorizontalPodAutoscaler"
)
:
&
HorizontalPodAutoscalerDescriber
{
c
},
extensions
.
Kind
(
"Deployment"
)
:
&
DeploymentDescriber
{
clientset
.
FromUnversionedClient
(
c
)},
extensions
.
Kind
(
"DaemonSet"
)
:
&
DaemonSetDescriber
{
c
},
extensions
.
Kind
(
"Job"
)
:
&
JobDescriber
{
c
},
extensions
.
Kind
(
"Deployment"
)
:
&
DeploymentDescriber
{
clientset
.
FromUnversionedClient
(
c
)},
batch
.
Kind
(
"Job"
)
:
&
JobDescriber
{
c
},
extensions
.
Kind
(
"Job"
)
:
&
JobDescriber
{
c
},
extensions
.
Kind
(
"Ingress"
)
:
&
IngressDescriber
{
c
},
batch
.
Kind
(
"Job"
)
:
&
JobDescriber
{
c
},
extensions
.
Kind
(
"Ingress"
)
:
&
IngressDescriber
{
c
},
}
}
return
m
return
m
...
@@ -1585,6 +1587,11 @@ func (d *HorizontalPodAutoscalerDescriber) Describe(namespace, name string) (str
...
@@ -1585,6 +1587,11 @@ func (d *HorizontalPodAutoscalerDescriber) Describe(namespace, name string) (str
fmt
.
Fprintf
(
out
,
"failed to check Replication Controller
\n
"
)
fmt
.
Fprintf
(
out
,
"failed to check Replication Controller
\n
"
)
}
}
}
}
events
,
_
:=
d
.
client
.
Events
(
namespace
)
.
Search
(
hpa
)
if
events
!=
nil
{
DescribeEvents
(
events
,
out
)
}
return
nil
return
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