diff --git a/nodeadm/internal/aws/ecr/ecr.go b/nodeadm/internal/aws/ecr/ecr.go index 2b113e28a..4e1355d46 100644 --- a/nodeadm/internal/aws/ecr/ecr.go +++ b/nodeadm/internal/aws/ecr/ecr.go @@ -3,6 +3,7 @@ package ecr import ( "context" "fmt" + "go.uber.org/zap" "net" "strings" "time" @@ -49,10 +50,11 @@ func GetEKSRegistry(region string) (ECRRegistry, error) { } if fipsInstalled && fipsEnabled { fipsRegistry := getRegistry(account, "ecr-fips", region, servicesDomain) - if addresses, err := net.LookupHost(fipsRegistry); err != nil { - return "", err - } else if len(addresses) > 0 { + addresses, err := net.LookupHost(fipsRegistry) + if err == nil && len(addresses) > 0 { return ECRRegistry(fipsRegistry), nil + } else { + zap.L().Info("Fail to look up Fips registry for requested region, fall back to default", zap.String("fipsRegistry", fipsRegistry)) } } return ECRRegistry(getRegistry(account, "ecr", region, servicesDomain)), nil