Skip to content

Commit 95463a1

Browse files
committed
Use pre-assigned dual stack network v4-v6
1 parent 3dba2fb commit 95463a1

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

tests/scripts/cleanup-vm.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ gcloud compute instances delete "${RESOURCE_NAME}" --quiet --project="${GKE_PROJ
1818
gcloud compute firewall-rules delete "${RESOURCE_NAME}" --quiet --project="${GKE_PROJECT}" || true
1919

2020
# Clean up the custom network and subnet if IPv6 was enabled
21-
if [ "${IPV6_ENABLED}" = "true" ]; then
22-
gcloud compute networks subnets delete ${RESOURCE_NAME} --region=${GKE_CLUSTER_REGION} --quiet || true
23-
gcloud compute networks delete ${RESOURCE_NAME} --quiet || true
24-
fi
21+
# if [ "${IPV6_ENABLED}" = "true" ]; then
22+
# gcloud compute networks subnets delete ${RESOURCE_NAME} --region=${GKE_CLUSTER_REGION} --quiet || true
23+
# gcloud compute networks delete ${RESOURCE_NAME} --quiet || true
24+
# fi

tests/scripts/create-and-setup-gcp-vm.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,9 @@ source scripts/vars.env
1515
# Create custom network and subnet if IPv6 is enabled
1616
# For IPv6, we create a dual-stack subnet with internal IPv6 addresses and external IPv4 addresses
1717
if [ "${IPV6_ENABLED}" = "true" ]; then
18-
echo "Creating IPv6 Network interface for the GKE cluster"
19-
gcloud compute networks create ${RESOURCE_NAME} --subnet-mode=custom --quiet # The --subnet-mode=custom flag allows us to create custom subnets
20-
21-
gcloud compute networks subnets create ${RESOURCE_NAME} \
22-
--network=${RESOURCE_NAME} \
23-
--stack-type=IPV4_IPV6 \
24-
--ipv6-access-type=INTERNAL \
25-
--region=${GKE_CLUSTER_REGION} \
26-
--range=10.120.0.0/14
27-
28-
NETWORK=${RESOURCE_NAME}
18+
echo "Using IPv6 Network interface for the GKE cluster"
19+
20+
NETWORK="v4-v6"
2921
NETWORK_TIER="ipv6-network-tier=PREMIUM"
3022
STACK_TYPE="IPV4_IPV6"
3123
fi

0 commit comments

Comments
 (0)