func RegisterCloudProvider(name string, cloud Factory) {
	providersMutex.Lock()
	defer providersMutex.Unlock()
	if _, found := providers[name]; found {
		klog.Fatalf("Cloud provider %q was registered twice", name)
	}
	klog.V(1).Infof("Registered cloud provider %q", name)
	providers[name] = cloud
}
RegisterCloudProvider registers a cloudprovider.Factory by name.  This
is expected to happen during app startup.
package cloudprovider
import (
	"fmt"
	"io"
	"os"
	"sync"
	"k8s.io/klog/v2"
)
type Factory func(config io.Reader) (Interface, error)
var (
	providersMutex           sync.Mutex
	providers                = make(map[string]Factory)
	deprecatedCloudProviders = []struct {
		name     string
		external bool
		detail   string
	}{
		{"aws", false, "The AWS provider is deprecated and will be removed in a future release. Please use https://github.com/kubernetes/cloud-provider-aws"},
		{"azure", false, "The Azure provider is deprecated and will be removed in a future release. Please use https://github.com/kubernetes-sigs/cloud-provider-azure"},
		{"gce", false, "The GCE provider is deprecated and will be removed in a future release. Please use https://github.com/kubernetes/cloud-provider-gcp"},
		{"openstack", true, "https://github.com/kubernetes/cloud-provider-openstack"},
		{"vsphere", false, "The vSphere provider is deprecated and will be removed in a future release. Please use https://github.com/kubernetes/cloud-provider-vsphere"},
	}
)
const externalCloudProvider = "external"