func GetKubeConfigOrInClusterConfig(kubeConfigFile string, overrides configv1.ClientConnectionOverrides) (*rest.Config, error) {
	if len(kubeConfigFile) > 0 {
		return GetClientConfig(kubeConfigFile, overrides)
	}

	clientConfig, err := rest.InClusterConfig()
	if err != nil {
		return nil, err
	}
	applyClientConnectionOverrides(overrides, clientConfig)
	clientConfig.WrapTransport = client.ClientTransportOverrides{WrapTransport: clientConfig.WrapTransport}.DefaultClientTransport

	return clientConfig, nil
}
// GetKubeConfigOrInClusterConfig loads in-cluster config if kubeConfigFile is empty or the file if not,
// then applies overrides.
GetKubeConfigOrInClusterConfig loads in-cluster config if kubeConfigFile is empty or the file if not,
then applies overrides.
// GetKubeConfigOrInClusterConfig loads in - cluster config if kubeConfigFile is empty or the file if not // then applies overrides .
func GetKubeConfigOrInClusterConfig(kubeConfigFile string, overrides configv1.ClientConnectionOverrides) (*rest.Config, error) {
	if len(kubeConfigFile) > 0 {
		return GetClientConfig(kubeConfigFile, overrides)
	}
	clientConfig, err := rest.InClusterConfig()
	if err != nil {
		return nil, err
	}
	applyClientConnectionOverrides(overrides, clientConfig)
	clientConfig.WrapTransport = client.ClientTransportOverrides{WrapTransport: clientConfig.WrapTransport}.DefaultClientTransport
	return clientConfig, nil
}
func GetKubeConfigOrInClusterConfig ( kubeConfigFile string , overrides configv1 . ClientConnectionOverrides ) ( * rest . Config , error ) { if len ( kubeConfigFile ) > 0 { return GetClientConfig ( kubeConfigFile , overrides ) } clientConfig , err := rest . InClusterConfig ( ) if err != nil { return nil , err } applyClientConnectionOverrides ( overrides , clientConfig ) clientConfig . WrapTransport = client . ClientTransportOverrides { WrapTransport : clientConfig . WrapTransport } . DefaultClientTransport return clientConfig , nil }
GetKubeConfigOrInClusterConfig loads in-cluster config if kubeConfigFile is empty or the file if not,
then applies overrides.
GetKubeConfigOrInClusterConfig loads in - cluster config if kubeConfigFile is empty or the file if not then applies overrides .