Skip to content

Commit

Permalink
update prow script to enable primary ipv6 address (#3510)
Browse files Browse the repository at this point in the history
* update prow script to enable primary ipv6 address

* modify existing ENI to enable primary ipv6 instead of creating new ones
  • Loading branch information
oliviassss authored Dec 18, 2023
1 parent a99cd56 commit a5ecd78
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ function install_controller_for_adc_regions() {
kubectl apply -f $ingclass_yaml || true
}

function enable_primary_ipv6_address() {
echo "enable primary ipv6 address for the ec2 instance"
ENI_IDS=$(aws ec2 describe-instances --filters "Name=tag:aws:eks:cluster-name,Values=$CLUSTER_NAME" --query "Reservations[].Instances[].NetworkInterfaces[].NetworkInterfaceId" --output text)
for ENI_ID in $ENI_IDS; do
aws ec2 modify-network-interface-attribute --network-interface-id $ENI_ID --enable-primary-ipv6 || true
done
}

echo "installing AWS load balancer controller"
if [[ $ADC_REGIONS == *"$REGION"* ]]; then
echo "for ADC regions, install via manifest"
Expand Down Expand Up @@ -214,6 +222,9 @@ function run_ginkgo_test() {
}

#Start the test
if [ "$IP_FAMILY" == "IPv6" ]; then
enable_primary_ipv6_address
fi
run_ginkgo_test

# tail=-1 is added so that no logs are truncated
Expand Down

0 comments on commit a5ecd78

Please sign in to comment.