Skip to content

Commit

Permalink
Add support for guest accelerators in GKE node pool
Browse files Browse the repository at this point in the history
  • Loading branch information
rzk authored and pst committed Dec 6, 2024
1 parent a77da45 commit 89a5ece
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions google/cluster/node-pool/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ locals {
instance_tags = local.cfg["instance_tags"]

ephemeral_storage_local_ssd_config = local.cfg["ephemeral_storage_local_ssd_config"]

guest_accelerator = local.cfg["guest_accelerator"]
}
2 changes: 2 additions & 0 deletions google/cluster/node-pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ module "node_pool" {
network_config = local.network_config

ephemeral_storage_local_ssd_config = local.ephemeral_storage_local_ssd_config

guest_accelerator = local.guest_accelerator
}
12 changes: 11 additions & 1 deletion google/cluster/node-pool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ variable "configuration" {
value = string
effect = string
})))

labels = optional(map(string))

labels = optional(map(string))
Expand Down Expand Up @@ -62,6 +62,16 @@ variable "configuration" {
ephemeral_storage_local_ssd_config = optional(object({
local_ssd_count = number
}))

guest_accelerator = optional(object({
type = string
count = number
gpu_partition_size = optional(string)
gpu_sharing_config = optional(object({
gpu_sharing_strategy = optional(string)
max_shared_clients_per_gpu = optional(number)
}))
}))
}))

description = "Map with per workspace cluster configuration."
Expand Down

0 comments on commit 89a5ece

Please sign in to comment.