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
7db36811
Commit
7db36811
authored
Jul 26, 2017
by
guangxuli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add daemonset to all categories
parent
d4897e87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
factory_test.go
pkg/kubectl/cmd/util/factory_test.go
+2
-2
categories.go
pkg/kubectl/resource/categories.go
+1
-0
categories_test.go
pkg/kubectl/resource/categories_test.go
+1
-0
storage.go
pkg/registry/extensions/daemonset/storage/storage.go
+7
-0
No files found.
pkg/kubectl/cmd/util/factory_test.go
View file @
7db36811
...
...
@@ -746,12 +746,12 @@ func TestDiscoveryReplaceAliases(t *testing.T) {
{
name
:
"all-replacement"
,
arg
:
"all"
,
expected
:
"pods,replicationcontrollers,services,statefulsets.apps,horizontalpodautoscalers.autoscaling,jobs.batch,cronjobs.batch,deployments.extensions,replicasets.extensions"
,
expected
:
"pods,replicationcontrollers,services,statefulsets.apps,horizontalpodautoscalers.autoscaling,jobs.batch,cronjobs.batch,d
aemonsets.extensions,d
eployments.extensions,replicasets.extensions"
,
},
{
name
:
"alias-in-comma-separated-arg"
,
arg
:
"all,secrets"
,
expected
:
"pods,replicationcontrollers,services,statefulsets.apps,horizontalpodautoscalers.autoscaling,jobs.batch,cronjobs.batch,deployments.extensions,replicasets.extensions,secrets"
,
expected
:
"pods,replicationcontrollers,services,statefulsets.apps,horizontalpodautoscalers.autoscaling,jobs.batch,cronjobs.batch,d
aemonsets.extensions,d
eployments.extensions,replicasets.extensions,secrets"
,
},
}
...
...
pkg/kubectl/resource/categories.go
View file @
7db36811
...
...
@@ -118,6 +118,7 @@ var legacyUserResources = []schema.GroupResource{
{
Group
:
"autoscaling"
,
Resource
:
"horizontalpodautoscalers"
},
{
Group
:
"batch"
,
Resource
:
"jobs"
},
{
Group
:
"batch"
,
Resource
:
"cronjobs"
},
{
Group
:
"extensions"
,
Resource
:
"daemonsets"
},
{
Group
:
"extensions"
,
Resource
:
"deployments"
},
{
Group
:
"extensions"
,
Resource
:
"replicasets"
},
}
...
...
pkg/kubectl/resource/categories_test.go
View file @
7db36811
...
...
@@ -47,6 +47,7 @@ func TestCategoryExpansion(t *testing.T) {
{
Resource
:
"horizontalpodautoscalers"
,
Group
:
"autoscaling"
},
{
Resource
:
"jobs"
,
Group
:
"batch"
},
{
Resource
:
"cronjobs"
,
Group
:
"batch"
},
{
Resource
:
"daemonsets"
,
Group
:
"extensions"
},
{
Resource
:
"deployments"
,
Group
:
"extensions"
},
{
Resource
:
"replicasets"
,
Group
:
"extensions"
},
},
...
...
pkg/registry/extensions/daemonset/storage/storage.go
View file @
7db36811
...
...
@@ -67,6 +67,13 @@ func (r *REST) ShortNames() []string {
return
[]
string
{
"ds"
}
}
var
_
rest
.
CategoriesProvider
=
&
REST
{}
// Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of.
func
(
r
*
REST
)
Categories
()
[]
string
{
return
[]
string
{
"all"
}
}
// StatusREST implements the REST endpoint for changing the status of a daemonset
type
StatusREST
struct
{
store
*
genericregistry
.
Store
...
...
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