Skip to content

Commit

Permalink
[tf/gcp][fullnode] fix nap scheduling and apply when disabled (aptos-…
Browse files Browse the repository at this point in the history
  • Loading branch information
rustielin authored Dec 4, 2022
1 parent 071885c commit 60ee595
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions terraform/fullnode/gcp/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ resource "google_container_cluster" "aptos" {
cluster_autoscaling {
enabled = var.gke_enable_node_autoprovisioning

resource_limits {
resource_type = "cpu"
minimum = 1
maximum = var.gke_node_autoprovisioning_max_cpu
}

resource_limits {
resource_type = "memory"
minimum = 1
maximum = var.gke_node_autoprovisioning_max_memory
dynamic "resource_limits" {
for_each = var.gke_enable_node_autoprovisioning ? {
"cpu" = var.gke_node_autoprovisioning_max_cpu
"memory" = var.gke_node_autoprovisioning_max_memory
} : {}
content {
resource_type = resource_limits.key
minimum = 1
maximum = resource_limits.value
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/fullnode/gcp/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ resource "helm_release" "fullnode" {
image = {
tag = var.image_tag
}
nodeSelector = {
nodeSelector = var.gke_enable_node_autoprovisioning ? {} : {
"cloud.google.com/gke-nodepool" = "fullnodes"
"iam.gke.io/gke-metadata-server-enabled" = "true"
}
Expand Down

0 comments on commit 60ee595

Please sign in to comment.