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
781480d7
Commit
781480d7
authored
Feb 18, 2016
by
Madhusudan.C.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add DaemonSets and Deployments to valid resources list in kubectl.
parent
f5082b6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
cmd.go
pkg/kubectl/cmd/cmd.go
+5
-0
kubectl.go
pkg/kubectl/kubectl.go
+2
-0
No files found.
pkg/kubectl/cmd/cmd.go
View file @
781480d7
...
...
@@ -110,8 +110,13 @@ __custom_func() {
esac
}
`
// If you add a resource to this list, please also take a look at pkg/kubectl/kubectl.go
// and add a short forms entry in expandResourceShortcut() when appropriate.
valid_resources
=
`Valid resource types include:
* componentstatuses (aka 'cs')
* daemonsets (aka 'ds')
* deployments
* events (aka 'ev')
* endpoints (aka 'ep')
* horizontalpodautoscalers (aka 'hpa')
...
...
pkg/kubectl/kubectl.go
View file @
781480d7
...
...
@@ -100,6 +100,8 @@ func (e ShortcutExpander) ResourceSingularizer(resource string) (string, error)
func
expandResourceShortcut
(
resource
unversioned
.
GroupVersionResource
)
unversioned
.
GroupVersionResource
{
shortForms
:=
map
[
string
]
unversioned
.
GroupVersionResource
{
// Please keep this alphabetized
// If you add an entry here, please also take a look at pkg/kubectl/cmd/cmd.go
// and add an entry to valid_resources when appropriate.
"cs"
:
api
.
SchemeGroupVersion
.
WithResource
(
"componentstatuses"
),
"ds"
:
extensions
.
SchemeGroupVersion
.
WithResource
(
"daemonsets"
),
"ep"
:
api
.
SchemeGroupVersion
.
WithResource
(
"endpoints"
),
...
...
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