diff --git a/terraform/gcp/cluster.tf b/terraform/gcp/cluster.tf index e270d09007..eab4d22ac4 100644 --- a/terraform/gcp/cluster.tf +++ b/terraform/gcp/cluster.tf @@ -243,7 +243,7 @@ resource "google_container_node_pool" "notebook" { project = google_container_cluster.cluster.project version = var.k8s_versions.notebook_nodes_version - node_locations = each.value.zones == null ? google_container_cluster.cluster.node_locations : each.value.zones + node_locations = length(each.value.zones) == 0 ? [var.zone] : each.value.zones initial_node_count = each.value.min @@ -342,7 +342,7 @@ resource "google_container_node_pool" "dask_worker" { project = google_container_cluster.cluster.project version = var.k8s_versions.dask_nodes_version - node_locations = each.value.zones == null ? google_container_cluster.cluster.node_locations : each.value.zones + node_locations = length(each.value.zones) == 0 ? [var.zone] : each.value.zones # Default to same config as notebook nodepools config for_each = var.dask_nodes diff --git a/terraform/gcp/projects/pilot-hubs.tfvars b/terraform/gcp/projects/pilot-hubs.tfvars index 9526532fd4..b43cf9d96c 100644 --- a/terraform/gcp/projects/pilot-hubs.tfvars +++ b/terraform/gcp/projects/pilot-hubs.tfvars @@ -34,7 +34,25 @@ notebook_nodes = { }], resource_labels : { "community" : "climatematch" - } + }, + }, + # Nodepool for neurohackademy. Tracking issue: https://github.com/2i2c-org/infrastructure/issues/2681 + "neurohackademy" : { + # We expect around 120 users + min : 0, + max : 100, + machine_type : "n1-highmem-16", + labels : { + "2i2c.org/community" : "neurohackademy" + }, + taints : [{ + key : "2i2c.org/community", + value : "neurohackademy", + effect : "NO_SCHEDULE" + }], + resource_labels : { + "community" : "neurohackademy" + }, } } diff --git a/terraform/gcp/variables.tf b/terraform/gcp/variables.tf index c24c52e090..4bdfd27d27 100644 --- a/terraform/gcp/variables.tf +++ b/terraform/gcp/variables.tf @@ -84,7 +84,7 @@ variable "notebook_nodes" { {} ), resource_labels : optional(map(string), {}), - zones : optional(list(string), null) + zones : optional(list(string), []) })) description = "Notebook node pools to create" default = {} @@ -111,7 +111,7 @@ variable "dask_nodes" { {} ), resource_labels : optional(map(string), {}), - zones : optional(list(string), null) + zones : optional(list(string), []) })) description = "Dask node pools to create. Defaults to notebook_nodes" default = {}