fix: update providerid prefix for aws

This PR updates the ProviderID format for aws resources. There seems to
be a bug when using Talos CCM (which consumes this value from Talos)
because the format is `aws://x/y` (two slashes) vs. the expected
`aws:///x/y` (three slashes) that is set with the AWS CCM code
[here](d055109367/pkg/providers/v1/instances.go (L47-L53)).

Setting only two slashes causes important software in the workload
cluster to fail, specifically cluster-autoscaler. The regex they use for
pulling providerID is [here](702e9685d6/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go (L195)).

Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
This commit is contained in:
Jared Davenport 2023-08-02 20:41:44 -04:00 committed by Spencer Smith
parent ac2aff5cc5
commit bcf2845307
No known key found for this signature in database
GPG Key ID: 036C4E711644C223
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ func (a *AWS) ParseMetadata(metadata *MetadataConfig) (*runtime.PlatformNetworkC
Zone: metadata.Zone,
InstanceType: metadata.InstanceType,
InstanceID: metadata.InstanceID,
ProviderID: fmt.Sprintf("aws://%s/%s", metadata.Zone, metadata.InstanceID),
ProviderID: fmt.Sprintf("aws:///%s/%s", metadata.Zone, metadata.InstanceID),
Spot: metadata.InstanceLifeCycle == "spot",
}

View File

@ -16,4 +16,4 @@ metadata:
region: us-east-1
zone: us-east-1a
instanceId: i-0a0a0a0a0a0a0a0a0
providerId: aws://us-east-1a/i-0a0a0a0a0a0a0a0a0
providerId: aws:///us-east-1a/i-0a0a0a0a0a0a0a0a0