func installCoreAPIs(s *options.ServerRunOptions, g *genericapiserver.GenericAPIServer, optsGetter generic.RESTOptionsGetter) { serviceStore, serviceStatusStore := servicestore.NewREST(optsGetter) namespaceStore, namespaceStatusStore, namespaceFinalizeStore := namespacestore.NewREST(optsGetter) secretStore := secretstore.NewREST(optsGetter) configMapStore := configmapstore.NewREST(optsGetter) eventStore := eventstore.NewREST(optsGetter, uint64(s.EventTTL.Seconds())) coreResources := map[string]rest.Storage{ "secrets": secretStore, "services": serviceStore, "services/status": serviceStatusStore, "namespaces": namespaceStore, "namespaces/status": namespaceStatusStore, "namespaces/finalize": namespaceFinalizeStore, "events": eventStore, "configmaps": configMapStore, } coreGroupMeta := api.Registry.GroupOrDie(core.GroupName) apiGroupInfo := genericapiserver.APIGroupInfo{ GroupMeta: *coreGroupMeta, VersionedResourcesStorageMap: map[string]map[string]rest.Storage{ v1.SchemeGroupVersion.Version: coreResources, }, OptionsExternalVersion: &api.Registry.GroupOrDie(core.GroupName).GroupVersion, Scheme: core.Scheme, ParameterCodec: core.ParameterCodec, NegotiatedSerializer: core.Codecs, } if err := g.InstallLegacyAPIGroup(genericapiserver.DefaultLegacyAPIPrefix, &apiGroupInfo); err != nil { glog.Fatalf("Error in registering group version: %+v.\n Error: %v\n", apiGroupInfo, err) } }