Skip to content

Commit

Permalink
multiple useragent pool
Browse files Browse the repository at this point in the history
Signed-off-by: Murali Krishnasamy <[email protected]>
  • Loading branch information
mukrishn committed Sep 10, 2024
1 parent 70038d5 commit 8a1ec92
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ param aksKeyVaultName = 'aks-kv-cs-integ-mc-1'
param systemAgentMinCount = 2
param systemAgentMaxCount = 3
param systemAgentVMSize = 'Standard_D2s_v3'
param userAgentMinCount = 3
param userAgentMaxCount = 9
param userAgentMinCount = 1
param userAgentMaxCount = 3
param userAgentVMSize = 'Standard_D2s_v3'
param userAgentPoolAZCount = 3
param persist = true

param deployMaestroConsumer = true
Expand Down
5 changes: 3 additions & 2 deletions dev-infrastructure/configurations/mgmt-cluster.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ param aksEtcdKVEnableSoftDelete = false
param systemAgentMinCount = 2
param systemAgentMaxCount = 3
param systemAgentVMSize = 'Standard_D2s_v3'
param userAgentMinCount = 2
param userAgentMaxCount = 5
param userAgentMinCount = 1
param userAgentMaxCount = 3
param userAgentVMSize = 'Standard_D2s_v3'
param userAgentPoolAZCount = 3
param persist = false

param deployMaestroConsumer = true
Expand Down
5 changes: 3 additions & 2 deletions dev-infrastructure/configurations/mvp-mgmt-cluster.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ param aksKeyVaultName = 'aks-kv-aro-hcp-dev-mc-1'
param systemAgentMinCount = 2
param systemAgentMaxCount = 3
param systemAgentVMSize = 'Standard_D2s_v3'
param userAgentMinCount = 3
param userAgentMaxCount = 9
param userAgentMinCount = 1
param userAgentMaxCount = 3
param userAgentVMSize = 'Standard_D2s_v3'
param userAgentPoolAZCount = 3
param persist = true

param deployMaestroConsumer = true
Expand Down
14 changes: 6 additions & 8 deletions dev-infrastructure/modules/aks-cluster-base.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ param systemAgentVMSize string = 'Standard_D2s_v3'

// User agentpool spec (Worker)
param deployUserAgentPool bool = false
param userAgentMinCount int = 2
param userAgentMinCount int = 1
param userAgentMaxCount int = 3
param userAgentVMSize string = 'Standard_D2s_v3'
param userAgentPoolAZCount int = 3

param serviceCidr string = '10.130.0.0/16'
param dnsServiceIP string = '10.130.0.10'
Expand Down Expand Up @@ -103,9 +104,8 @@ var systemAgentPool = [
}
]

var userAgentPool = [
{
name: 'user'
var userAgentPool = [for i in range(0, userAgentPoolAZCount): {
name: 'user-${(i + 1)}'
osType: 'Linux'
osSKU: 'AzureLinux'
mode: 'User'
Expand All @@ -129,9 +129,7 @@ var userAgentPool = [
podSubnetID: aksPodSubnet.id
maxPods: 250
availabilityZones: [
'1'
'2'
'3'
'${(i + 1)}'
]
securityProfile: {
enableSecureBoot: false
Expand Down Expand Up @@ -315,7 +313,7 @@ resource aksCluster 'Microsoft.ContainerService/managedClusters@2024-04-02-previ
}
agentPoolProfiles: agentProfile
autoScalerProfile: {
'balance-similar-node-groups': 'false'
'balance-similar-node-groups': 'true'
'daemonset-eviction-for-occupied-nodes': true
'scan-interval': '10s'
'scale-down-delay-after-add': '10m'
Expand Down
6 changes: 5 additions & 1 deletion dev-infrastructure/templates/mgmt-cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ param aksNodeResourceGroupName string = '${resourceGroup().name}-aks1'
param vnetAddressPrefix string

@description('Min replicas for the worker nodes')
param userAgentMinCount int = 2
param userAgentMinCount int = 1

@description('Max replicas for the worker nodes')
param userAgentMaxCount int = 3

@description('VM instance type for the worker nodes')
param userAgentVMSize string = 'Standard_D2s_v3'

@description('Availability Zone count for worker nodes')
param userAgentPoolAZCount int = 3

@description('Min replicas for the system nodes')
param systemAgentMinCount int = 2

Expand Down Expand Up @@ -125,6 +128,7 @@ module mgmtCluster '../modules/aks-cluster-base.bicep' = {
deployUserAgentPool: true
acrPullResourceGroups: acrPullResourceGroups
userAgentMinCount: userAgentMinCount
userAgentPoolAZCount: userAgentPoolAZCount
userAgentMaxCount: userAgentMaxCount
userAgentVMSize: userAgentVMSize
systemAgentMinCount: systemAgentMinCount
Expand Down

0 comments on commit 8a1ec92

Please sign in to comment.