Skip to content

Commit 1f9a5bf

Browse files
committed
mc mar firewall rule
1 parent aa6d26b commit 1f9a5bf

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

e2e/aks_model.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,29 @@ func getFirewall(ctx context.Context, location, firewallSubnetID, publicIPID str
219219
TargetFqdns: []*string{to.Ptr(blobStorageFqdn)},
220220
}
221221

222+
// needed for Mock Azure China Cloud tests
223+
mooncakeMAR := "mcr.azure.cn"
224+
mooncakeMARData := "*.data.mcr.azure.cn"
225+
mooncakeMARRule := armnetwork.AzureFirewallApplicationRule{
226+
Name: to.Ptr("mooncake-mar-fqdn"),
227+
SourceAddresses: []*string{to.Ptr("*")},
228+
Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{
229+
{
230+
ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS),
231+
Port: to.Ptr[int32](443),
232+
},
233+
},
234+
TargetFqdns: []*string{to.Ptr(mooncakeMAR), to.Ptr(mooncakeMARData)},
235+
}
236+
222237
appRuleCollection := armnetwork.AzureFirewallApplicationRuleCollection{
223238
Name: to.Ptr("aksfwar"),
224239
Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{
225240
Priority: to.Ptr[int32](100),
226241
Action: &armnetwork.AzureFirewallRCAction{
227242
Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeAllow),
228243
},
229-
Rules: []*armnetwork.AzureFirewallApplicationRule{&aksAppRule, &blobStorageAppRule},
244+
Rules: []*armnetwork.AzureFirewallApplicationRule{&aksAppRule, &blobStorageAppRule, &mooncakeMARRule},
230245
},
231246
}
232247

0 commit comments

Comments
 (0)