Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit f988f50

Browse files
author
FengyunPan
committed
The Securty Group name should be unique
Currently the service's name is not unique, and the Securty Group name is not unique too. openstack cloud provider will delete the Securty Group of other loadbalancer service when do a deletion.
1 parent 49eb961 commit f988f50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func popMember(members []v2pools.Member, addr string, port int) []v2pools.Member
372372
}
373373

374374
func getSecurityGroupName(clusterName string, service *v1.Service) string {
375-
return fmt.Sprintf("lb-sg-%s-%v", clusterName, service.Name)
375+
return fmt.Sprintf("lb-sg-%s-%s-%s", clusterName, service.Namespace, service.Name)
376376
}
377377

378378
func getSecurityGroupRules(client *gophercloud.ServiceClient, opts rules.ListOpts) ([]rules.SecGroupRule, error) {

0 commit comments

Comments
 (0)