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: Brad Davidson <brad.davidson@rancher.com>
pull/6292/head v1.25.3-rc2+k3s1
Brad Davidson 2 years ago committed by Brad Davidson
parent 64403978cd
commit 3c0cd6f2dc

@ -2,6 +2,7 @@ package cloudprovider
import (
"context"
"fmt"
"strings"
"github.com/k3s-io/k3s/pkg/version"
@ -70,7 +71,7 @@ func (k *k3s) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovid
}
return &cloudprovider.InstanceMetadata{
ProviderID: version.Program,
ProviderID: fmt.Sprintf("%s://%s", version.Program, node.Name),
InstanceType: version.Program,
NodeAddresses: addresses,
Zone: "",

Loading…
Cancel
Save