Change:
In 1.9 vSphere cloud provider creates a new client, new shared informer factory and lists nodes IMO, the cloud provider should not create it's own client at all. GCE uses , called by controller-manager to initialize the cloud provider. This way, GCE does not need extra policy and it shares the informer with all the controllers. is called only in controller-manager process, i.e. for provisioning and attach/detach. Do you need the informer really in kubelet and/or API server? It's quite odd to list all nodes there. /kind bug /sig storage /sig auth
issue regarding is getting fixed with creating and binding with ServiceAccount. See is there a way in kubernetes, we can fix this without assigning permissions to serviceaccount? We will look into SetInformer interface GCE uses.
cloud provider specific roles should be applied externally as we prepare for moving cloud provider specific components out of tree. had feedback on the way that was wired in that would be good to adjust before copying that pattern
thanks for the pointer to old issue. I reworked this one to remove vsphere's own client (and policy).
/assign rohitjogvmw
GitHub didn't allow me to assign the following users: rohitjogvmw. Note that only and repo collaborators can be assigned. <detailsIn response to : /assign rohitjogvmw Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Running into this same issue (manifested as "Kubernetes node nodeVmDetail details is empty" error upon pvc build using vsphere). Commenting to watch progress. Happy to help debug if needed.
/assign divyenpatel

Discussion:
"//vendor/gopkg.in/gcfg.v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", <del> "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", </del> "//vendor/k8s.io/client-go/informers:go_default_library", "//vendor/k8s.io/client-go/tools/cache:go_default_library", ],

"golang.org/x/net/context" "k8s.io/api/core/v1" k8stypes "k8s.io/apimachinery/pkg/types" <del> "k8s.io/apimachinery/pkg/util/wait" </del> "k8s.io/client-go/informers" "k8s.io/client-go/tools/cache" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"

// Initialize passes a Kubernetes clientBuilder interface to the cloud provider func (vs *VSphere) Initialize(clientBuilder controller.ControllerClientBuilder) { <ins> } // Initialize Node Informers func (vs *VSphere) SetInformers(informerFactory informers.SharedInformerFactory) { </ins> if vs.cfg == nil { return } // Only on controller node it is required to register listeners. // Register callbacks for node updates <del> client := clientBuilder.ClientOrDie("vsphere-cloud-provider") factory := informers.NewSharedInformerFactory(client, 5*time.Minute) nodeInformer := factory.Core().V1().Nodes() nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ </del> <ins> glog.V(4).Infof("Setting up node informers for vSphere Cloud Provider") nodeInformer := informerFactory.Core().V1().Nodes().Informer() nodeInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ </ins> AddFunc:    vs.NodeAdded, DeleteFunc: vs.NodeDeleted, }) <del> go nodeInformer.Informer().Run(wait.NeverStop) glog.V(4).Infof("vSphere cloud provider initialized") </del> <ins> glog.V(4).Infof("Node informers in vSphere cloud provider initialized") </ins> } // Creates new worker node interface and returns