Merge pull request #57148 from deads2k/rebase-01-storagelocation

Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

expose special storage locations for downstream consumption

Storage locations are public information and needed for congruent storage.  This exposes them in their new home.
pull/6/head
Kubernetes Submit Queue 2017-12-16 21:00:41 -08:00 committed by GitHub
commit a162ec5307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -29,8 +29,8 @@ import (
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
) )
// specialDefaultResourcePrefixes are prefixes compiled into Kubernetes. // SpecialDefaultResourcePrefixes are prefixes compiled into Kubernetes.
var specialDefaultResourcePrefixes = map[schema.GroupResource]string{ var SpecialDefaultResourcePrefixes = map[schema.GroupResource]string{
{Group: "", Resource: "replicationControllers"}: "controllers", {Group: "", Resource: "replicationControllers"}: "controllers",
{Group: "", Resource: "replicationcontrollers"}: "controllers", {Group: "", Resource: "replicationcontrollers"}: "controllers",
{Group: "", Resource: "endpoints"}: "services/endpoints", {Group: "", Resource: "endpoints"}: "services/endpoints",
@ -53,7 +53,7 @@ func NewStorageFactory(storageConfig storagebackend.Config, defaultMediaType str
if err != nil { if err != nil {
return nil, err return nil, err
} }
return serverstorage.NewDefaultStorageFactory(storageConfig, defaultMediaType, serializer, resourceEncodingConfig, apiResourceConfig, specialDefaultResourcePrefixes), nil return serverstorage.NewDefaultStorageFactory(storageConfig, defaultMediaType, serializer, resourceEncodingConfig, apiResourceConfig, SpecialDefaultResourcePrefixes), nil
} }
// Merges the given defaultResourceConfig with specifc GroupvVersionResource overrides. // Merges the given defaultResourceConfig with specifc GroupvVersionResource overrides.