Skip to content

Commit

Permalink
Merge pull request #16809 from rifelpet/ipv6-prefix
Browse files Browse the repository at this point in the history
Fix ipv6 prefix detection with aws-sdk-go-v2
  • Loading branch information
k8s-ci-robot authored Sep 5, 2024
2 parents 99b3ad7 + a3a59fb commit 4bc07d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upup/pkg/fi/nodeup/nodetasks/prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"path"
"strings"

awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
awsconfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
"github.com/aws/aws-sdk-go-v2/service/ec2"
smithyhttp "github.com/aws/smithy-go/transport/http"
"k8s.io/klog/v2"
"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
Expand Down Expand Up @@ -128,7 +128,7 @@ func getInstanceMetadataList(ctx context.Context, category string) ([]string, er
metadata := imds.NewFromConfig(cfg)
resp, err := metadata.GetMetadata(ctx, &imds.GetMetadataInput{Path: category})
if err != nil {
var awsErr *awshttp.ResponseError
var awsErr *smithyhttp.ResponseError
if errors.As(err, &awsErr) && awsErr.HTTPStatusCode() == http.StatusNotFound {
return nil, nil
} else {
Expand Down

0 comments on commit 4bc07d7

Please sign in to comment.