mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
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>
This commit is contained in:
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…
Reference in New Issue
Block a user