Skip to content

Commit

Permalink
Add megapool
Browse files Browse the repository at this point in the history
  • Loading branch information
vesameskanen committed Dec 10, 2024
1 parent 3bb1cf0 commit 79eb43b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions env_vars/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"builder_max_node_count": "10"
"builder_max_surge": "3"

"mega_min_node_count": "0"
"mega_max_node_count": "10"
"mega_max_surge": "3"

"addons_to_add": "monitoring"
"addons_to_remove": "kube-dashboard"
"log_analytics_workspace_rg": "OMS-PROD-RG"
Expand Down
3 changes: 3 additions & 0 deletions roles/aks-setup/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ system_node_vm_size: "Standard_D4pds_v5"
default_node_vm_size: "Standard_B2ms"
worker_node_vm_size: "Standard_D4ads_v5"
builder_node_vm_size: "Standard_D8ads_v5"
mega_node_vm_size: "Standard_D8ads_v5"
default_nodepool_name: "burstpool"
worker_nodepool_name: "powerpool"
builder_nodepool_name: "builderpool"
system_nodepool_name: "systempool"
mega_nodepool_name: "megapool"
worker_taint: "powerPod=yes:NoSchedule"
builder_taint: "builder=yes:NoSchedule"
mega_taint: "megaPod=yes:NoSchedule"
16 changes: 16 additions & 0 deletions roles/aks-setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,19 @@
--node-taints {{builder_taint}}
delegate_to: localhost
ignore_errors: "{{ ansible_check_mode }}"

- name: "Create nodepool {{mega_nodepool_name}}"
command: "az aks nodepool add \
--resource-group {{aks_resource_group_name}} \
--cluster-name {{aks_name}} \
--name {{mega_nodepool_name}} \
--min-count {{mega_min_node_count}} \
--max-count {{mega_max_node_count}} \
--max-surge {{mega_max_surge}} \
--node-vm-size {{mega_node_vm_size}} \
--os-sku azurelinux \
--node-osdisk-type Ephemeral \
--enable-cluster-autoscaler \
--node-taints {{mega_taint}}
delegate_to: localhost
ignore_errors: "{{ ansible_check_mode }}"

0 comments on commit 79eb43b

Please sign in to comment.