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
fd38f4f4
Commit
fd38f4f4
authored
Feb 07, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20779 from smarterclayton/origin_explain
Auto commit by PR queue bot
parents
bc36f57a
664d25ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
explain.go
pkg/kubectl/cmd/explain.go
+1
-1
factory.go
pkg/kubectl/cmd/util/factory.go
+4
-3
No files found.
pkg/kubectl/cmd/explain.go
View file @
fd38f4f4
...
@@ -98,7 +98,7 @@ func RunExplain(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []st
...
@@ -98,7 +98,7 @@ func RunExplain(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []st
}
}
}
}
schema
,
err
:=
f
.
SwaggerSchema
(
apiVersion
)
schema
,
err
:=
f
.
SwaggerSchema
(
apiVersion
.
WithKind
(
gvk
.
Kind
)
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
pkg/kubectl/cmd/util/factory.go
View file @
fd38f4f4
...
@@ -106,8 +106,8 @@ type Factory struct {
...
@@ -106,8 +106,8 @@ type Factory struct {
ResumeObject
func
(
object
runtime
.
Object
)
(
bool
,
error
)
ResumeObject
func
(
object
runtime
.
Object
)
(
bool
,
error
)
// Returns a schema that can validate objects stored on disk.
// Returns a schema that can validate objects stored on disk.
Validator
func
(
validate
bool
,
cacheDir
string
)
(
validation
.
Schema
,
error
)
Validator
func
(
validate
bool
,
cacheDir
string
)
(
validation
.
Schema
,
error
)
// SwaggerSchema returns the schema declaration for the provided group version.
// SwaggerSchema returns the schema declaration for the provided group version
kind
.
SwaggerSchema
func
(
unversioned
.
GroupVersion
)
(
*
swagger
.
ApiDeclaration
,
error
)
SwaggerSchema
func
(
unversioned
.
GroupVersion
Kind
)
(
*
swagger
.
ApiDeclaration
,
error
)
// Returns the default namespace to use in cases where no
// Returns the default namespace to use in cases where no
// other namespace is specified and whether the namespace was
// other namespace is specified and whether the namespace was
// overriden.
// overriden.
...
@@ -408,7 +408,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
...
@@ -408,7 +408,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
}
}
return
validation
.
NullSchema
{},
nil
return
validation
.
NullSchema
{},
nil
},
},
SwaggerSchema
:
func
(
version
unversioned
.
GroupVersion
)
(
*
swagger
.
ApiDeclaration
,
error
)
{
SwaggerSchema
:
func
(
gvk
unversioned
.
GroupVersionKind
)
(
*
swagger
.
ApiDeclaration
,
error
)
{
version
:=
gvk
.
GroupVersion
()
client
,
err
:=
clients
.
ClientForVersion
(
&
version
)
client
,
err
:=
clients
.
ClientForVersion
(
&
version
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
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