Commit 206006cc authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Return ProviderID in URI format

The InstancesV1 interface handled this for us by combining the ProviderName and InstanceID values; the new interface requires us to do it manually Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent 128b882b
...@@ -2,6 +2,7 @@ package cloudprovider ...@@ -2,6 +2,7 @@ package cloudprovider
import ( import (
"context" "context"
"fmt"
"strings" "strings"
"github.com/k3s-io/k3s/pkg/version" "github.com/k3s-io/k3s/pkg/version"
...@@ -70,7 +71,7 @@ func (k *k3s) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovid ...@@ -70,7 +71,7 @@ func (k *k3s) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovid
} }
return &cloudprovider.InstanceMetadata{ return &cloudprovider.InstanceMetadata{
ProviderID: version.Program, ProviderID: fmt.Sprintf("%s://%s", version.Program, node.Name),
InstanceType: version.Program, InstanceType: version.Program,
NodeAddresses: addresses, NodeAddresses: addresses,
Zone: "", Zone: "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment