mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
shortcut expander will take the list of short names from the api server.
This commit is contained in:
@@ -75,7 +75,8 @@ func (f *ring1Factory) Object() (meta.RESTMapper, runtime.ObjectTyper) {
|
||||
}
|
||||
|
||||
// wrap with shortcuts
|
||||
mapper = NewShortcutExpander(mapper, discoveryClient)
|
||||
mapper, err = NewShortcutExpander(mapper, discoveryClient)
|
||||
CheckErr(err)
|
||||
|
||||
// wrap with output preferences
|
||||
cfg, err := f.clientAccessFactory.ClientConfigForVersion(nil)
|
||||
@@ -104,7 +105,8 @@ func (f *ring1Factory) UnstructuredObject() (meta.RESTMapper, runtime.ObjectType
|
||||
|
||||
mapper := discovery.NewDeferredDiscoveryRESTMapper(discoveryClient, meta.InterfacesForUnstructured)
|
||||
typer := discovery.NewUnstructuredObjectTyper(groupResources)
|
||||
return NewShortcutExpander(mapper, discoveryClient), typer, nil
|
||||
expander, err := NewShortcutExpander(mapper, discoveryClient)
|
||||
return expander, typer, err
|
||||
}
|
||||
|
||||
func (f *ring1Factory) ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error) {
|
||||
|
||||
Reference in New Issue
Block a user