From 57413d9a156250ad781654b1069b4e6f8a70cedd Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Fri, 9 Mar 2018 14:49:01 +0530 Subject: [PATCH] Change provisioner variable name. Signed-off-by: Humble Chirammal --- .../glusterfile-provisioner.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go b/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go index 6f433ab6ec4..9dfca7d1e35 100644 --- a/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go +++ b/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go @@ -284,7 +284,6 @@ func (p *glusterfileProvisioner) ExpandVolumeDevice(spec *volume.Spec, newSize r expansionSizeGiB := int(util.RoundUpToGiB(expansionSize)) // Find out requested Size - //requestGiB := util.RoundUpToGiB(newSize) requestGiB := int(util.RoundUpToGiB(newSize.Value())) //Check the existing volume size @@ -509,6 +508,7 @@ func (p *glusterfileProvisioner) Delete(volume *v1.PersistentVolume) error { return nil } + func (p *glusterfileProvisioner) deleteEndpointService(namespace string, epServiceName string) (err error) { kubeClient := p.client if kubeClient == nil { @@ -730,16 +730,16 @@ func main() { glog.Fatalf("Failed to create config: %v", err) } - prName := provisionerName - provName := os.Getenv(provisionerNameKey) + provName := provisionerName + provEnvName := os.Getenv(provisionerNameKey) // Precedence is given for ProvisionerNameKey - if provName != "" && *id != "" { - prName = provName + if provEnvName != "" && *id != "" { + provName = provEnvName } - if provName == "" && *id != "" { - prName = *id + if provEnvName == "" && *id != "" { + provName = *id } clientset, err := kubernetes.NewForConfig(config) @@ -756,14 +756,14 @@ func main() { // Create the provisioner: it implements the Provisioner interface expected by // the controller - glusterfileProvisioner := NewglusterfileProvisioner(clientset, prName) + glusterfileProvisioner := NewglusterfileProvisioner(clientset, provName) // Start the provision controller which will dynamically provision glusterfs // PVs pc := controller.NewProvisionController( clientset, - prName, + provName, glusterfileProvisioner, serverVersion.GitVersion, )