Skip to content

Commit

Permalink
Revert "Build correct externalID"
Browse files Browse the repository at this point in the history
This reverts commit 3d20db6.
  • Loading branch information
kzaitsev committed Jul 28, 2023
1 parent 3d20db6 commit 07a461f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions serverscom/instances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func TestInstances_InstanceIDWithCloudInstance(t *testing.T) {
providerID, err := instances.InstanceID(ctx, types.NodeName(nodeName))

g.Expect(err).To(BeNil())
g.Expect(providerID).To(Equal("serverscom://cloud-instance/a"))
g.Expect(providerID).To(Equal("cloud-instance/a"))
}

func TestInstances_InstanceIDWithDedicatedServer(t *testing.T) {
Expand Down Expand Up @@ -380,7 +380,7 @@ func TestInstances_InstanceIDWithDedicatedServer(t *testing.T) {
providerID, err := instances.InstanceID(ctx, types.NodeName(nodeName))

g.Expect(err).To(BeNil())
g.Expect(providerID).To(Equal("serverscom://dedicated-server/a"))
g.Expect(providerID).To(Equal("dedicated-server/a"))
}

func TestInstances_InstanceIDWithKubernetesBaremetalNode(t *testing.T) {
Expand Down Expand Up @@ -428,7 +428,7 @@ func TestInstances_InstanceIDWithKubernetesBaremetalNode(t *testing.T) {
providerID, err := instances.InstanceID(ctx, types.NodeName(nodeName))

g.Expect(err).To(BeNil())
g.Expect(providerID).To(Equal("serverscom://kubernetes-baremetal-node/a"))
g.Expect(providerID).To(Equal("kubernetes-baremetal-node/a"))
}

func TestInstances_InstanceTypeWithCloudInstance(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion serverscom/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func collectHostAddresses(host *cli.Host) []v1.NodeAddress {
}

func buildExternalID(instanceType, ID string) string {
return fmt.Sprintf("%s://%s/%s", providerName, instanceType, ID)
return fmt.Sprintf("%s/%s", instanceType, ID)
}

func getLoadBalancerName(srv *v1.Service, clusterName string) string {
Expand Down

0 comments on commit 07a461f

Please sign in to comment.