mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Allow the api-version on the command to override the client builder
This commit is contained in:
		@@ -64,7 +64,9 @@ func NewFactory(clientBuilder clientcmd.Builder) *Factory {
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		Client: func(cmd *cobra.Command, mapping *meta.RESTMapping) (kubectl.RESTClient, error) {
 | 
			
		||||
			return clientBuilder.Client()
 | 
			
		||||
			return clientBuilder.Override(func(c *client.Config) {
 | 
			
		||||
				c.Version = mapping.APIVersion
 | 
			
		||||
			}).Client()
 | 
			
		||||
		},
 | 
			
		||||
		Describer: func(cmd *cobra.Command, mapping *meta.RESTMapping) (kubectl.Describer, error) {
 | 
			
		||||
			client, err := clientBuilder.Client()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user