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
137cd9e6
Commit
137cd9e6
authored
Sep 26, 2017
by
Di Xu
Committed by
Janet Kuo
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix missing apps/replicaset in kubectl
parent
b188868f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
factory_client_access.go
pkg/kubectl/cmd/util/factory_client_access.go
+2
-2
delete.go
pkg/kubectl/delete.go
+1
-1
scale.go
pkg/kubectl/scale.go
+1
-1
No files found.
pkg/kubectl/cmd/util/factory_client_access.go
View file @
137cd9e6
...
@@ -625,7 +625,7 @@ func (f *ring0Factory) Generators(cmdName string) map[string]kubectl.Generator {
...
@@ -625,7 +625,7 @@ func (f *ring0Factory) Generators(cmdName string) map[string]kubectl.Generator {
func
(
f
*
ring0Factory
)
CanBeExposed
(
kind
schema
.
GroupKind
)
error
{
func
(
f
*
ring0Factory
)
CanBeExposed
(
kind
schema
.
GroupKind
)
error
{
switch
kind
{
switch
kind
{
case
api
.
Kind
(
"ReplicationController"
),
api
.
Kind
(
"Service"
),
api
.
Kind
(
"Pod"
),
case
api
.
Kind
(
"ReplicationController"
),
api
.
Kind
(
"Service"
),
api
.
Kind
(
"Pod"
),
extensions
.
Kind
(
"Deployment"
),
apps
.
Kind
(
"Deployment"
),
extensions
.
Kind
(
"ReplicaSet"
)
:
extensions
.
Kind
(
"Deployment"
),
apps
.
Kind
(
"Deployment"
),
extensions
.
Kind
(
"ReplicaSet"
)
,
apps
.
Kind
(
"ReplicaSet"
)
:
// nothing to do here
// nothing to do here
default
:
default
:
return
fmt
.
Errorf
(
"cannot expose a %s"
,
kind
)
return
fmt
.
Errorf
(
"cannot expose a %s"
,
kind
)
...
@@ -636,7 +636,7 @@ func (f *ring0Factory) CanBeExposed(kind schema.GroupKind) error {
...
@@ -636,7 +636,7 @@ func (f *ring0Factory) CanBeExposed(kind schema.GroupKind) error {
func
(
f
*
ring0Factory
)
CanBeAutoscaled
(
kind
schema
.
GroupKind
)
error
{
func
(
f
*
ring0Factory
)
CanBeAutoscaled
(
kind
schema
.
GroupKind
)
error
{
switch
kind
{
switch
kind
{
case
api
.
Kind
(
"ReplicationController"
),
extensions
.
Kind
(
"ReplicaSet"
),
case
api
.
Kind
(
"ReplicationController"
),
extensions
.
Kind
(
"ReplicaSet"
),
extensions
.
Kind
(
"Deployment"
),
apps
.
Kind
(
"Deployment"
)
:
extensions
.
Kind
(
"Deployment"
),
apps
.
Kind
(
"Deployment"
)
,
apps
.
Kind
(
"ReplicaSet"
)
:
// nothing to do here
// nothing to do here
default
:
default
:
return
fmt
.
Errorf
(
"cannot autoscale a %v"
,
kind
)
return
fmt
.
Errorf
(
"cannot autoscale a %v"
,
kind
)
...
...
pkg/kubectl/delete.go
View file @
137cd9e6
...
@@ -72,7 +72,7 @@ func ReaperFor(kind schema.GroupKind, c internalclientset.Interface) (Reaper, er
...
@@ -72,7 +72,7 @@ func ReaperFor(kind schema.GroupKind, c internalclientset.Interface) (Reaper, er
case
api
.
Kind
(
"ReplicationController"
)
:
case
api
.
Kind
(
"ReplicationController"
)
:
return
&
ReplicationControllerReaper
{
c
.
Core
(),
Interval
,
Timeout
},
nil
return
&
ReplicationControllerReaper
{
c
.
Core
(),
Interval
,
Timeout
},
nil
case
extensions
.
Kind
(
"ReplicaSet"
)
:
case
extensions
.
Kind
(
"ReplicaSet"
)
,
apps
.
Kind
(
"ReplicaSet"
)
:
return
&
ReplicaSetReaper
{
c
.
Extensions
(),
Interval
,
Timeout
},
nil
return
&
ReplicaSetReaper
{
c
.
Extensions
(),
Interval
,
Timeout
},
nil
case
extensions
.
Kind
(
"DaemonSet"
),
apps
.
Kind
(
"DaemonSet"
)
:
case
extensions
.
Kind
(
"DaemonSet"
),
apps
.
Kind
(
"DaemonSet"
)
:
...
...
pkg/kubectl/scale.go
View file @
137cd9e6
...
@@ -54,7 +54,7 @@ func ScalerFor(kind schema.GroupKind, c internalclientset.Interface) (Scaler, er
...
@@ -54,7 +54,7 @@ func ScalerFor(kind schema.GroupKind, c internalclientset.Interface) (Scaler, er
switch
kind
{
switch
kind
{
case
api
.
Kind
(
"ReplicationController"
)
:
case
api
.
Kind
(
"ReplicationController"
)
:
return
&
ReplicationControllerScaler
{
c
.
Core
()},
nil
return
&
ReplicationControllerScaler
{
c
.
Core
()},
nil
case
extensions
.
Kind
(
"ReplicaSet"
)
:
case
extensions
.
Kind
(
"ReplicaSet"
)
,
apps
.
Kind
(
"ReplicaSet"
)
:
return
&
ReplicaSetScaler
{
c
.
Extensions
()},
nil
return
&
ReplicaSetScaler
{
c
.
Extensions
()},
nil
case
batch
.
Kind
(
"Job"
)
:
case
batch
.
Kind
(
"Job"
)
:
return
&
JobScaler
{
c
.
Batch
()},
nil
// Either kind of job can be scaled with Batch interface.
return
&
JobScaler
{
c
.
Batch
()},
nil
// Either kind of job can be scaled with Batch interface.
...
...
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