Skip to content

Commit

Permalink
Merge pull request #344 from kbst/remove-duplicate-variables
Browse files Browse the repository at this point in the history
Fix duplicate variables from previous PRs, defaults for maintenance exclusions
  • Loading branch information
pst authored Dec 9, 2024
2 parents f5280ec + 0c77b85 commit 278e2f4
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 39 deletions.
2 changes: 1 addition & 1 deletion google/_modules/gke/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resource "google_container_cluster" "current" {
}

dynamic "maintenance_exclusion" {
for_each = var.maintenance_exclusion_start_time != null ? [1] : []
for_each = var.maintenance_exclusion_start_time != "" ? [1] : []

content {
start_time = var.maintenance_exclusion_start_time
Expand Down
15 changes: 1 addition & 14 deletions google/_modules/gke/node_pool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,6 @@ variable "network_config" {
create_pod_range = bool
pod_ipv4_cidr_block = string
})
description = "Additional network configuration for the node pool."
}

variable "ephemeral_storage_local_ssd_config" {
type = object({
local_ssd_count = number
})
description = "`ephemeral_storage_local_ssd_config` block, useful for node groups with local SSD. Defaults to `null`"
description = "Configure additional pod IP address range for the node pool. Defaults to `null`"
default = null
}

variable "labels" {
type = map(string)
description = "Kubernetes labels to set on the nodes created by the node pool. Merged with Kubestack default labels."
default = {}
}
4 changes: 0 additions & 4 deletions google/cluster/node-pool/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,4 @@ locals {
network_config = local.cfg["network_config"]

instance_tags = local.cfg["instance_tags"]

ephemeral_storage_local_ssd_config = local.cfg["ephemeral_storage_local_ssd_config"]

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

network_config = local.network_config

ephemeral_storage_local_ssd_config = local.ephemeral_storage_local_ssd_config

guest_accelerator = local.guest_accelerator
}
16 changes: 0 additions & 16 deletions google/cluster/node-pool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ variable "configuration" {

labels = optional(map(string))

labels = optional(map(string))

extra_oauth_scopes = optional(list(string))

node_workload_metadata_config = optional(string)
Expand Down Expand Up @@ -58,20 +56,6 @@ variable "configuration" {
}))

instance_tags = optional(list(string))

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 278e2f4

Please sign in to comment.