Skip to content

Commit 901dc41

Browse files
authored
[AKS] support parameter OutboundType (#21457)
1 parent d4ea356 commit 901dc41

File tree

6 files changed

+2636
-6
lines changed

6 files changed

+2636
-6
lines changed

src/Aks/Aks.Test/ScenarioTests/KubernetesTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,5 +205,12 @@ public void TestEnableOidcIssuer()
205205
{
206206
TestRunner.RunTestScript("Test-EnableOidcIssuer");
207207
}
208+
209+
[Fact]
210+
[Trait(Category.AcceptanceType, Category.CheckIn)]
211+
public void TestOutboundType()
212+
{
213+
TestRunner.RunTestScript("Test-OutboundType");
214+
}
208215
}
209216
}

src/Aks/Aks.Test/ScenarioTests/KubernetesTests.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,4 +1193,23 @@ function Test-EnableOidcIssuer {
11931193
finally {
11941194
Remove-AzResourceGroup -Name $resourceGroupName -Force
11951195
}
1196+
}
1197+
1198+
function Test-OutboundType {
1199+
# Setup
1200+
$resourceGroupName = Get-RandomResourceGroupName
1201+
$kubeClusterName = Get-RandomClusterName
1202+
$location = 'eastus'
1203+
$nodeVmSize = "Standard_D2_v2"
1204+
1205+
try {
1206+
New-AzResourceGroup -Name $resourceGroupName -Location $location
1207+
1208+
New-AzAksCluster -ResourceGroupName $resourceGroupName -Name $kubeClusterName -NodeVmSize $nodeVmSize -NodeCount 1 -OutboundType managedNATGateway
1209+
$cluster = Get-AzAksCluster -ResourceGroupName $resourceGroupName -Name $kubeClusterName
1210+
Assert-AreEqual 'managedNATGateway' $cluster.NetworkProfile.OutboundType
1211+
}
1212+
finally {
1213+
Remove-AzResourceGroup -Name $resourceGroupName -Force
1214+
}
11961215
}

0 commit comments

Comments
 (0)