Skip to content

Commit

Permalink
Merge pull request kubernetes#16815 from rifelpet/automated-cherry-pi…
Browse files Browse the repository at this point in the history
…ck-of-#16809-origin-release-1.30

Automated cherry pick of kubernetes#16809: Fix ipv6 prefix detection with aws-sdk-go-v2
  • Loading branch information
k8s-ci-robot authored Sep 6, 2024
2 parents 9bced90 + f139617 commit 644e202
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 644e202

Please sign in to comment.