Skip to content

Commit 89a5ece

Browse files
rzkpst
authored andcommitted
Add support for guest accelerators in GKE node pool
1 parent a77da45 commit 89a5ece

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

google/cluster/node-pool/configuration.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ locals {
4848
instance_tags = local.cfg["instance_tags"]
4949

5050
ephemeral_storage_local_ssd_config = local.cfg["ephemeral_storage_local_ssd_config"]
51+
52+
guest_accelerator = local.cfg["guest_accelerator"]
5153
}

google/cluster/node-pool/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ module "node_pool" {
4545
network_config = local.network_config
4646

4747
ephemeral_storage_local_ssd_config = local.ephemeral_storage_local_ssd_config
48+
49+
guest_accelerator = local.guest_accelerator
4850
}

google/cluster/node-pool/variables.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ variable "configuration" {
2626
value = string
2727
effect = string
2828
})))
29-
29+
3030
labels = optional(map(string))
3131

3232
labels = optional(map(string))
@@ -62,6 +62,16 @@ variable "configuration" {
6262
ephemeral_storage_local_ssd_config = optional(object({
6363
local_ssd_count = number
6464
}))
65+
66+
guest_accelerator = optional(object({
67+
type = string
68+
count = number
69+
gpu_partition_size = optional(string)
70+
gpu_sharing_config = optional(object({
71+
gpu_sharing_strategy = optional(string)
72+
max_shared_clients_per_gpu = optional(number)
73+
}))
74+
}))
6575
}))
6676

6777
description = "Map with per workspace cluster configuration."

0 commit comments

Comments
 (0)