mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Use the new client.SetKubernetesDefaults methods to properly default config object
This commit is contained in:
		@@ -325,17 +325,9 @@ func (c *clientCache) ClientConfigForVersion(version string) (*client.Config, er
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// TODO: remove when SetKubernetesDefaults gets added
 | 
					 | 
				
			||||||
	if len(version) == 0 {
 | 
					 | 
				
			||||||
		version = c.defaultConfig.Version
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// TODO: have a better config copy method
 | 
						// TODO: have a better config copy method
 | 
				
			||||||
	config := *c.defaultConfig
 | 
						config := *c.defaultConfig
 | 
				
			||||||
 | 
						client.SetKubernetesDefaults(&config)
 | 
				
			||||||
	// TODO: call new client.SetKubernetesDefaults method
 | 
					 | 
				
			||||||
	// instead of doing this
 | 
					 | 
				
			||||||
	config.Version = version
 | 
					 | 
				
			||||||
	return &config, nil
 | 
						return &config, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user