Skip to content

Commit

Permalink
feat: create a dedicated pool for prometheus and beef up the instance
Browse files Browse the repository at this point in the history
  • Loading branch information
monteiro-renato committed Jan 17, 2025
1 parent aca73d4 commit dd388aa
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,22 @@ resource "azurerm_kubernetes_cluster_node_pool" "spot" {
"kubernetes.azure.com/scalesetpriority=spot:NoSchedule", # Automatically added by Azure
]
}

resource "azurerm_kubernetes_cluster_node_pool" "prometheus" {
name = "prometheus"
kubernetes_cluster_id = azurerm_kubernetes_cluster.k6tests.id
vm_size = "Standard_D3_v2"
auto_scaling_enabled = false
node_count = 1
priority = "Spot" # Spot since we are still testing
eviction_policy = "Delete"
spot_max_price = -1 # (the current on-demand price for a Virtual Machine)
node_labels = {
"kubernetes.azure.com/scalesetpriority" : "spot", # Automatically added by Azure
prometheus : true
}
node_taints = [
"kubernetes.azure.com/scalesetpriority=spot:NoSchedule", # Automatically added by Azure
"workload=prometheus:NoSchedule",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,23 @@ prometheus:
cloud: "AzurePublic"
sdk:
tenantId: "${tenant_id}"
tolerations:
- key: "kubernetes.azure.com/scalesetpriority"
operator: "Equal"
value: "spot"
effect: "NoSchedule"
- key: "workload"
operator: "Equal"
value: "prometheus"
effect: "NoSchedule"
resources:
requests:
memory: 8Gi
priorityClassName: "system-cluster-critical"
retention: 1d
storageSpec:
volumeClaimTemplate:
spec:
resources:
requests:
storage: 5Gi
storage: 15Gi

0 comments on commit dd388aa

Please sign in to comment.