mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Tolerate multiple registered versions in a single group
This commit is contained in:
@@ -183,7 +183,7 @@ func DefaultGenerators(cmdName string) map[string]kubectl.Generator {
|
||||
// if optionalClientConfig is nil, then flags will be bound to a new clientcmd.ClientConfig.
|
||||
// if optionalClientConfig is not nil, then this factory will make use of it.
|
||||
func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
|
||||
mapper := kubectl.ShortcutExpander{RESTMapper: api.RESTMapper}
|
||||
mapper := kubectl.ShortcutExpander{RESTMapper: registered.RESTMapper()}
|
||||
|
||||
flags := pflag.NewFlagSet("", pflag.ContinueOnError)
|
||||
flags.SetNormalizeFunc(util.WarnWordSepNormalizeFunc) // Warn for "_" flags
|
||||
|
||||
Reference in New Issue
Block a user