Skip to content

Commit

Permalink
Only use public IPs for 4.16 and above
Browse files Browse the repository at this point in the history
Currently CAPI is not allowing instances with Public IPs in 4.15 and
earlier. For now, this change only enables public IPs for versions 4.16
and newer.
  • Loading branch information
csrwng committed Dec 16, 2024
1 parent ba6cf38 commit 0a44e45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/blang/semver"
"github.com/go-logr/logr"
"github.com/go-logr/zapr"
hyperv1 "github.com/openshift/hypershift/api/hypershift/v1beta1"
Expand Down Expand Up @@ -582,6 +583,10 @@ func (o *options) DefaultAWSOptions() hypershiftaws.RawCreateOptions {
MultiArch: o.configurableClusterOptions.AWSMultiArch,
PublicOnly: true,
}
if e2eutil.IsLessThan(semver.MustParse("4.16.0")) {
opts.PublicOnly = false
}

opts.AdditionalTags = append(opts.AdditionalTags, o.additionalTags...)
if len(o.configurableClusterOptions.Zone) == 0 {
// align with default for e2e.aws-region flag
Expand Down

0 comments on commit 0a44e45

Please sign in to comment.