Subresources should be in their parent rest scope

A subresource like "Binding" does not necessarily have
to have a namespace.  The RESTScope of a subresource
should always be its parent resource.
This commit is contained in:
Clayton Coleman
2015-05-08 00:31:53 -04:00
parent b2a2ce0bb3
commit 84d1f19016
3 changed files with 143 additions and 8 deletions

View File

@@ -711,7 +711,7 @@ func (m *Master) api_v1beta2() *apiserver.APIGroupVersion {
func (m *Master) api_v1beta3() *apiserver.APIGroupVersion {
storage := make(map[string]rest.Storage)
for k, v := range m.storage {
if k == "minions" {
if k == "minions" || k == "minions/status" {
continue
}
storage[strings.ToLower(k)] = v
@@ -727,7 +727,7 @@ func (m *Master) api_v1beta3() *apiserver.APIGroupVersion {
func (m *Master) api_v1() *apiserver.APIGroupVersion {
storage := make(map[string]rest.Storage)
for k, v := range m.storage {
if k == "minions" {
if k == "minions" || k == "minions/status" {
continue
}
storage[strings.ToLower(k)] = v