Skip to content

Commit a5ecd78

Browse files
authored
update prow script to enable primary ipv6 address (#3510)
* update prow script to enable primary ipv6 address * modify existing ENI to enable primary ipv6 instead of creating new ones
1 parent a99cd56 commit a5ecd78

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/run-e2e-test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ function install_controller_for_adc_regions() {
155155
kubectl apply -f $ingclass_yaml || true
156156
}
157157

158+
function enable_primary_ipv6_address() {
159+
echo "enable primary ipv6 address for the ec2 instance"
160+
ENI_IDS=$(aws ec2 describe-instances --filters "Name=tag:aws:eks:cluster-name,Values=$CLUSTER_NAME" --query "Reservations[].Instances[].NetworkInterfaces[].NetworkInterfaceId" --output text)
161+
for ENI_ID in $ENI_IDS; do
162+
aws ec2 modify-network-interface-attribute --network-interface-id $ENI_ID --enable-primary-ipv6 || true
163+
done
164+
}
165+
158166
echo "installing AWS load balancer controller"
159167
if [[ $ADC_REGIONS == *"$REGION"* ]]; then
160168
echo "for ADC regions, install via manifest"
@@ -214,6 +222,9 @@ function run_ginkgo_test() {
214222
}
215223

216224
#Start the test
225+
if [ "$IP_FAMILY" == "IPv6" ]; then
226+
enable_primary_ipv6_address
227+
fi
217228
run_ginkgo_test
218229

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

0 commit comments

Comments
 (0)