Merge pull request #70286 from humblec/pvc-uuid

Use pvc uid instead of pvc name in glusterfs endpoint name.
This commit is contained in:
k8s-ci-robot 2018-10-29 05:30:38 -07:00 committed by GitHub
commit eb1aa875b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -822,11 +822,11 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsVolum
return nil, 0, "", fmt.Errorf("failed to get cluster nodes for volume %s: %v", volume, err)
}
// The 'endpointname' is created in form of 'glusterfs-dynamic-<claimname>'.
// The 'endpointname' is created in form of 'glusterfs-dynamic-<PVC UID>'.
// createEndpointService() checks for this 'endpoint' existence in PVC's namespace and
// If not found, it create an endpoint and service using the IPs we dynamically picked at time
// if not found, it create an endpoint and service using the IPs we dynamically picked at time
// of volume creation.
epServiceName := dynamicEpSvcPrefix + p.options.PVC.Name
epServiceName := dynamicEpSvcPrefix + string(p.options.PVC.UID)
epNamespace := p.options.PVC.Namespace
endpoint, service, err := p.createEndpointService(epNamespace, epServiceName, dynamicHostIps, p.options.PVC.Name)
if err != nil {