ports should also use replaced name

This commit is contained in:
Jesse Haka 2019-02-05 16:01:56 +02:00
parent ad43fb0eea
commit 306895fb4b
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ func (os *clusterDiscoveryOS) ListPorts() ([]*resources.Resource, error) {
}
for _, port := range ports {
if strings.Contains(port.Name, os.clusterName) {
clusteReplaced := strings.Replace(os.clusterName, ".", "-", -1)
if strings.HasSuffix(port.Name, clusteReplaced) {
resourceTracker := &resources.Resource{
Name: port.Name,
ID: port.ID,