Skip to content

Commit d8d38ca

Browse files
committed
add aks node pool availability zones
1 parent 5dae58b commit d8d38ca

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Release Notes
22
=============
33

4+
## 1.9.8
5+
* AKS Cluster: support for node pool availability zones
6+
47
## 1.9.7
58
* AKS Cluster: support for Sku and Tier. Support for pod subnet in agent pool config. Support for node pool autoscaling
69
* CosmosDB: Add support for Gremlin Graphs

docs/content/api-overview/resources/aks-cluster.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ The Agent Pool builder (`agentPool`) constructs agent pools in the AKS cluster.
5757
| pod_subnet | Sets the name of a virtual network subnet where this AKS cluster should be attached. |
5858
| subnet | Sets the name of a virtual network subnet where this AKS cluster should be attached. |
5959
| vm_size | Sets the size of the VM's in the agent pool. |
60+
| add_availability_zones | Sets the Azure availability zones for the VM's in the agent pool. |
6061
| vnet | Sets the name of a virtual network in the same region where this AKS cluster should be attached. |
6162
| enable_autoscale | Enables node pool autoscale |
6263
| autoscale_scale_down_mode | Optional. Use with enable_autoscaling. Options are Delete and Deallocate |

src/Farmer/Arm/ContainerService.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ type ManagedCluster = {
183183
OsDiskSize: int<Gb>
184184
OsType: OS
185185
VmSize: VMSize
186+
AvailabilityZones: string list
186187
VirtualNetworkName: ResourceName option
187188
SubnetName: ResourceName option
188189
PodSubnetName: ResourceName option
@@ -295,6 +296,7 @@ type ManagedCluster = {
295296
osDiskSizeGB = agent.OsDiskSize
296297
osType = string agent.OsType
297298
vmSize = agent.VmSize.ArmValue
299+
availabilityZones = agent.AvailabilityZones
298300
vnetSubnetID =
299301
match agent.VirtualNetworkName, agent.SubnetName with
300302
| Some vnet, Some subnet -> subnets.resourceId(vnet, subnet).Eval()

src/Farmer/Builders/Builders.ContainerService.fs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type AgentPoolConfig = {
1919
OsDiskSize: int<Gb>
2020
OsType: OS
2121
VmSize: VMSize
22+
AvailabilityZones: string list
2223
VirtualNetworkName: ResourceName option
2324
SubnetName: ResourceName option
2425
PodSubnetName: ResourceName option
@@ -42,6 +43,7 @@ type AgentPoolConfig = {
4243
SubnetName = None
4344
PodSubnetName = None
4445
VmSize = Standard_DS2_v2
46+
AvailabilityZones = []
4547
AutoscaleSetting = None
4648
ScaleDownMode = None
4749
MinCount = None
@@ -185,6 +187,7 @@ type AksConfig = {
185187
SubnetName = agentPool.SubnetName
186188
PodSubnetName = agentPool.PodSubnetName
187189
VmSize = agentPool.VmSize
190+
AvailabilityZones = agentPool.AvailabilityZones
188191
VirtualNetworkName = agentPool.VirtualNetworkName
189192
AutoscaleSetting = agentPool.AutoscaleSetting
190193
ScaleDownMode = agentPool.ScaleDownMode
@@ -282,6 +285,12 @@ type AgentPoolBuilder() =
282285
[<CustomOperation "os_type">]
283286
member _.OsType(state: AgentPoolConfig, os) = { state with OsType = os }
284287

288+
[<CustomOperation "add_availability_zones">]
289+
member _.AddAvailabilityZone(state: AgentPoolConfig, availabilityZones: string list) = {
290+
state with
291+
AvailabilityZones = state.AvailabilityZones @ availabilityZones
292+
}
293+
285294
/// Sets the name of a virtual network subnet where this AKS cluster should be attached.
286295
[<CustomOperation "subnet">]
287296
member _.SubnetName(state: AgentPoolConfig, subnetName) = {

src/Tests/test-data/aks-with-acr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"properties": {
5454
"agentPoolProfiles": [
5555
{
56+
"availabilityZones": [],
5657
"count": 3,
5758
"mode": "System",
5859
"name": "nodepool1",

0 commit comments

Comments
 (0)