Skip to content

Commit

Permalink
update nsg rule
Browse files Browse the repository at this point in the history
  • Loading branch information
smritidahal653 committed Jul 20, 2024
1 parent 915a54d commit e9dabc9
Showing 1 changed file with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions hack/e2e/aks-addon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ fi

TMPDIR=""

cleanup() {
az group delete --name "$RESOURCE_GROUP" --yes --no-wait || true
if [ -n "$TMPDIR" ]; then
rm -rf "$TMPDIR"
fi
}
trap 'cleanup' EXIT
# cleanup() {
# az group delete --name "$RESOURCE_GROUP" --yes --no-wait || true
# if [ -n "$TMPDIR" ]; then
# rm -rf "$TMPDIR"
# fi
# }
# trap 'cleanup' EXIT


check_aci_registered() {
Expand Down Expand Up @@ -114,57 +114,57 @@ az network vnet subnet create \
--address-prefix $ACI_SUBNET_CIDR \
--network-security-group $NSG_NAME

az network nsg rule create \
--resource-group $RESOURCE_GROUP \
--nsg-name $NSG_NAME \
--name AllowClusterSubnetTraffic \
--priority 1000 \
--direction Inbound \
--access Allow \
--protocol '*' \
--source-address-prefix $CLUSTER_SUBNET_CIDR \
--source-port-range '*' \
--destination-address-prefix $CLUSTER_SUBNET_CIDR \
--destination-port-range '*'

az network nsg rule create \
--resource-group $RESOURCE_GROUP \
--nsg-name $NSG_NAME \
--name AllowClusterSubnetOutbound \
--priority 1100 \
--direction Outbound \
--access Allow \
--protocol '*' \
--source-address-prefix $CLUSTER_SUBNET_CIDR \
--source-port-range '*' \
--destination-address-prefix '*' \
--destination-port-range '*'

az network nsg rule create \
--resource-group $RESOURCE_GROUP \
--nsg-name $NSG_NAME \
--name AllowACISubnetTraffic \
--priority 1100 \
--direction Inbound \
--access Allow \
--protocol '*' \
--source-address-prefix $ACI_SUBNET_CIDR \
--source-port-range '*' \
--destination-address-prefix $ACI_SUBNET_CIDR \
--destination-port-range '*'
# az network nsg rule create \
# --resource-group $RESOURCE_GROUP \
# --nsg-name $NSG_NAME \
# --name AllowClusterSubnetTraffic \
# --priority 1000 \
# --direction Inbound \
# --access Allow \
# --protocol '*' \
# --source-address-prefix $CLUSTER_SUBNET_CIDR \
# --source-port-range '*' \
# --destination-address-prefix $CLUSTER_SUBNET_CIDR \
# --destination-port-range '*'

# az network nsg rule create \
# --resource-group $RESOURCE_GROUP \
# --nsg-name $NSG_NAME \
# --name AllowClusterSubnetOutbound \
# --priority 1100 \
# --direction Outbound \
# --access Allow \
# --protocol '*' \
# --source-address-prefix $CLUSTER_SUBNET_CIDR \
# --source-port-range '*' \
# --destination-address-prefix '*' \
# --destination-port-range '*'

# az network nsg rule create \
# --resource-group $RESOURCE_GROUP \
# --nsg-name $NSG_NAME \
# --name AllowACISubnetTraffic \
# --priority 1100 \
# --direction Inbound \
# --access Allow \
# --protocol '*' \
# --source-address-prefix $ACI_SUBNET_CIDR \
# --source-port-range '*' \
# --destination-address-prefix $ACI_SUBNET_CIDR \
# --destination-port-range '*'

az network nsg rule create \
--resource-group $RESOURCE_GROUP \
--nsg-name $NSG_NAME \
--name AllowACISubnetOutbound \
--priority 1300 \
--direction Outbound \
--access Allow \
--protocol '*' \
--source-address-prefix $ACI_SUBNET_CIDR \
--source-port-range '*' \
--destination-address-prefix '*' \
--destination-port-range '*'
# az network nsg rule create \
# --resource-group $RESOURCE_GROUP \
# --nsg-name $NSG_NAME \
# --name AllowACISubnetOutbound \
# --priority 1300 \
# --direction Outbound \
# --access Allow \
# --protocol '*' \
# --source-address-prefix $ACI_SUBNET_CIDR \
# --source-port-range '*' \
# --destination-address-prefix '*' \
# --destination-port-range '*'

cluster_subnet_id="$(az network vnet subnet show \
--resource-group $RESOURCE_GROUP \
Expand Down

0 comments on commit e9dabc9

Please sign in to comment.