Skip to content

Commit b4bab6d

Browse files
committed
Fix instanceType
1 parent 2084b5a commit b4bab6d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

serverscom/utils.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ package serverscom
22

33
import (
44
"fmt"
5+
"k8s.io/klog/v2"
56
"regexp"
67
"strings"
78

89
cli "github.com/serverscom/serverscom-go-client/pkg"
910
v1 "k8s.io/api/core/v1"
10-
11-
"k8s.io/klog/v2"
1211
)
1312

1413
const (
@@ -45,7 +44,7 @@ func parseProviderID(providerID string) (string, string, error) {
4544
return "", "", fmt.Errorf("error splitting providerID: %s", providerID)
4645
}
4746

48-
return matches[1], matches[2], nil
47+
return strings.Replace(matches[1], "_", "-", 0), matches[2], nil
4948
}
5049

5150
func collectCloudInstanceAddresses(cloudInstance *cli.CloudComputingInstance) []v1.NodeAddress {

0 commit comments

Comments
 (0)