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
319f5b28
Commit
319f5b28
authored
Mar 22, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Not all Kinds should be registered to RESTMapper
parent
fc3609fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
latest.go
pkg/api/latest/latest.go
+7
-0
No files found.
pkg/api/latest/latest.go
View file @
319f5b28
...
@@ -26,6 +26,7 @@ import (
...
@@ -26,6 +26,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)
)
// Version is the string that represents the current external default version.
// Version is the string that represents the current external default version.
...
@@ -122,9 +123,15 @@ func init() {
...
@@ -122,9 +123,15 @@ func init() {
"Namespace"
:
true
,
"Namespace"
:
true
,
}
}
// these kinds should be excluded from the list of resources
ignoredKinds
:=
util
.
NewStringSet
(
"ListOptions"
,
"DeleteOptions"
,
"Status"
,
"ContainerManifest"
)
// enumerate all supported versions, get the kinds, and register with the mapper how to address our resources
// enumerate all supported versions, get the kinds, and register with the mapper how to address our resources
for
_
,
version
:=
range
versions
{
for
_
,
version
:=
range
versions
{
for
kind
:=
range
api
.
Scheme
.
KnownTypes
(
version
)
{
for
kind
:=
range
api
.
Scheme
.
KnownTypes
(
version
)
{
if
ignoredKinds
.
Has
(
kind
)
{
continue
}
mixedCase
,
found
:=
versionMixedCase
[
version
]
mixedCase
,
found
:=
versionMixedCase
[
version
]
if
!
found
{
if
!
found
{
mixedCase
=
false
mixedCase
=
false
...
...
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