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
1a753659
Commit
1a753659
authored
Apr 24, 2018
by
David Eads
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core v1 API requires autoscaling/v1 to serve the Scale endpoint
parent
df50da3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
test-update-storage-objects.sh
hack/test-update-storage-objects.sh
+3
-3
helpers.go
...src/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go
+2
-2
resource_config.go
...rc/k8s.io/apiserver/pkg/server/storage/resource_config.go
+12
-0
No files found.
hack/test-update-storage-objects.sh
View file @
1a753659
...
@@ -120,7 +120,7 @@ KUBE_NEW_STORAGE_VERSIONS="storage.k8s.io/v1"
...
@@ -120,7 +120,7 @@ KUBE_NEW_STORAGE_VERSIONS="storage.k8s.io/v1"
# but KUBE_OLD_API_VERSION is the latest (storage) version.
# but KUBE_OLD_API_VERSION is the latest (storage) version.
# Additionally use KUBE_STORAGE_MEDIA_TYPE_JSON for storage encoding.
# Additionally use KUBE_STORAGE_MEDIA_TYPE_JSON for storage encoding.
#######################################################
#######################################################
KUBE_API_VERSIONS
=
"v1,
${
KUBE_OLD_API_VERSION
}
,
${
KUBE_NEW_API_VERSION
}
"
KUBE_API_VERSIONS
=
"v1,
autoscaling/v1,
${
KUBE_OLD_API_VERSION
}
,
${
KUBE_NEW_API_VERSION
}
"
RUNTIME_CONFIG
=
"api/all=false,api/v1=true,
${
KUBE_OLD_API_VERSION
}
=true,
${
KUBE_NEW_API_VERSION
}
=true"
RUNTIME_CONFIG
=
"api/all=false,api/v1=true,
${
KUBE_OLD_API_VERSION
}
=true,
${
KUBE_NEW_API_VERSION
}
=true"
startApiServer
${
KUBE_OLD_STORAGE_VERSIONS
}
${
KUBE_STORAGE_MEDIA_TYPE_JSON
}
startApiServer
${
KUBE_OLD_STORAGE_VERSIONS
}
${
KUBE_STORAGE_MEDIA_TYPE_JSON
}
...
@@ -155,7 +155,7 @@ killApiServer
...
@@ -155,7 +155,7 @@ killApiServer
# Still use KUBE_STORAGE_MEDIA_TYPE_JSON for storage encoding.
# Still use KUBE_STORAGE_MEDIA_TYPE_JSON for storage encoding.
#######################################################
#######################################################
KUBE_API_VERSIONS
=
"v1,
${
KUBE_NEW_API_VERSION
}
,
${
KUBE_OLD_API_VERSION
}
"
KUBE_API_VERSIONS
=
"v1,
autoscaling/v1,
${
KUBE_NEW_API_VERSION
}
,
${
KUBE_OLD_API_VERSION
}
"
RUNTIME_CONFIG
=
"api/all=false,api/v1=true,
${
KUBE_OLD_API_VERSION
}
=true,
${
KUBE_NEW_API_VERSION
}
=true"
RUNTIME_CONFIG
=
"api/all=false,api/v1=true,
${
KUBE_OLD_API_VERSION
}
=true,
${
KUBE_NEW_API_VERSION
}
=true"
startApiServer
${
KUBE_NEW_STORAGE_VERSIONS
}
${
KUBE_STORAGE_MEDIA_TYPE_JSON
}
startApiServer
${
KUBE_NEW_STORAGE_VERSIONS
}
${
KUBE_STORAGE_MEDIA_TYPE_JSON
}
...
@@ -186,7 +186,7 @@ killApiServer
...
@@ -186,7 +186,7 @@ killApiServer
# However, change storage encoding to KUBE_STORAGE_MEDIA_TYPE_PROTOBUF.
# However, change storage encoding to KUBE_STORAGE_MEDIA_TYPE_PROTOBUF.
#######################################################
#######################################################
KUBE_API_VERSIONS
=
"v1,
${
KUBE_NEW_API_VERSION
}
"
KUBE_API_VERSIONS
=
"v1,
autoscaling/v1,
${
KUBE_NEW_API_VERSION
}
"
RUNTIME_CONFIG
=
"api/all=false,api/v1=true,
${
KUBE_NEW_API_VERSION
}
=true"
RUNTIME_CONFIG
=
"api/all=false,api/v1=true,
${
KUBE_NEW_API_VERSION
}
=true"
# This seems to reduce flakiness.
# This seems to reduce flakiness.
...
...
staging/src/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go
View file @
1a753659
...
@@ -78,9 +78,9 @@ func MergeAPIResourceConfigs(
...
@@ -78,9 +78,9 @@ func MergeAPIResourceConfigs(
if
ok
{
if
ok
{
if
allAPIFlagValue
==
"false"
{
if
allAPIFlagValue
==
"false"
{
// Disable all group versions.
// Disable all group versions.
resourceConfig
.
Disable
Versions
(
registry
.
RegisteredGroupVersions
()
...
)
resourceConfig
.
Disable
All
(
)
}
else
if
allAPIFlagValue
==
"true"
{
}
else
if
allAPIFlagValue
==
"true"
{
resourceConfig
.
Enable
Versions
(
registry
.
RegisteredGroupVersions
()
...
)
resourceConfig
.
Enable
All
(
)
}
}
}
}
...
...
staging/src/k8s.io/apiserver/pkg/server/storage/resource_config.go
View file @
1a753659
...
@@ -36,6 +36,18 @@ func NewResourceConfig() *ResourceConfig {
...
@@ -36,6 +36,18 @@ func NewResourceConfig() *ResourceConfig {
return
&
ResourceConfig
{
GroupVersionConfigs
:
map
[
schema
.
GroupVersion
]
bool
{}}
return
&
ResourceConfig
{
GroupVersionConfigs
:
map
[
schema
.
GroupVersion
]
bool
{}}
}
}
func
(
o
*
ResourceConfig
)
DisableAll
()
{
for
k
:=
range
o
.
GroupVersionConfigs
{
o
.
GroupVersionConfigs
[
k
]
=
false
}
}
func
(
o
*
ResourceConfig
)
EnableAll
()
{
for
k
:=
range
o
.
GroupVersionConfigs
{
o
.
GroupVersionConfigs
[
k
]
=
true
}
}
// DisableVersions disables the versions entirely.
// DisableVersions disables the versions entirely.
func
(
o
*
ResourceConfig
)
DisableVersions
(
versions
...
schema
.
GroupVersion
)
{
func
(
o
*
ResourceConfig
)
DisableVersions
(
versions
...
schema
.
GroupVersion
)
{
for
_
,
version
:=
range
versions
{
for
_
,
version
:=
range
versions
{
...
...
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