mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Integrate convertion tool to kubectl
Added 'convert' subcommand to kubectl to convert config files between different API versions.
This commit is contained in:
@@ -532,3 +532,11 @@ func (f *Factory) ClientMapperForCommand() resource.ClientMapper {
|
||||
return f.RESTClient(mapping)
|
||||
})
|
||||
}
|
||||
|
||||
// NilClientMapperForCommand returns a ClientMapper which always returns nil.
|
||||
// When command is running locally and client isn't needed, this mapper can be parsed to NewBuilder.
|
||||
func (f *Factory) NilClientMapperForCommand() resource.ClientMapper {
|
||||
return resource.ClientMapperFunc(func(mapping *meta.RESTMapping) (resource.RESTClient, error) {
|
||||
return nil, nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user