Fix stutter between the package name and the function

pull/4229/head
Medya Gh 2019-05-15 11:34:21 -07:00
parent 6384a2294e
commit 6fe614efa7
3 changed files with 4 additions and 4 deletions

View File

@ -111,8 +111,8 @@ func isValidEnv(env string) bool {
return false
}
// SetNoProxyK8s takes a k8s config and upadates the proxy
func SetNoProxyK8s(cfg *rest.Config) *rest.Config {
// UpdateConfigTranport takes a k8s rest config and returns a config without a proxy.
func UpdateConfigTranport(cfg *rest.Config) *rest.Config {
wt := cfg.WrapTransport // Config might already have a transport wrapper
cfg.WrapTransport = func(rt http.RoundTripper) http.RoundTripper {
if wt != nil {

View File

@ -85,7 +85,7 @@ func (*K8sClientGetter) GetClientset(timeout time.Duration) (*kubernetes.Clients
return nil, fmt.Errorf("Error creating kubeConfig: %v", err)
}
clientConfig.Timeout = timeout
clientConfig = proxy.SetNoProxyK8s(clientConfig)
clientConfig = proxy.UpdateConfigTranport(clientConfig)
client, err := kubernetes.NewForConfig(clientConfig)
if err != nil {
return nil, errors.Wrap(err, "Error creating new client from kubeConfig.ClientConfig()")

View File

@ -77,7 +77,7 @@ func GetClient() (kubernetes.Interface, error) {
if err != nil {
return nil, fmt.Errorf("Error creating kubeConfig: %v", err)
}
config = proxy.SetNoProxyK8s(config)
config = proxy.UpdateConfigTranport(config)
client, err := kubernetes.NewForConfig(config)
if err != nil {
return nil, errors.Wrap(err, "Error creating new client from kubeConfig.ClientConfig()")