Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add local_ssd_ephemeral_count to default configuration #1944

Merged
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Then perform the following commands on the root folder:
| ip\_range\_services | The _name_ of the secondary subnet range to use for services | `string` | n/a | yes |
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| logging\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
Expand Down
6 changes: 6 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,12 @@ resource "google_container_node_pool" "windows_pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
{% if beta_cluster %}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count",0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
Expand Down
5 changes: 5 additions & 0 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -889,3 +889,8 @@ variable "fleet_project_grant_service_agent" {
default = false
}
{% endif %}
variable "local_ssd_ephemeral_count" {
apeabody marked this conversation as resolved.
Show resolved Hide resolved
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
12 changes: 12 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,12 @@ resource "google_container_node_pool" "pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}

dynamic "local_nvme_ssd_block_config" {
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : []
Expand Down Expand Up @@ -820,6 +826,12 @@ resource "google_container_node_pool" "windows_pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}

dynamic "local_nvme_ssd_block_config" {
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : []
Expand Down
25 changes: 13 additions & 12 deletions examples/node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,19 @@ module "gke" {
service_account = var.compute_engine_service_account
},
{
name = "pool-03"
machine_type = "n1-standard-2"
node_locations = "${var.region}-b,${var.region}-c"
autoscaling = false
node_count = 2
disk_type = "pd-standard"
auto_upgrade = true
service_account = var.compute_engine_service_account
pod_range = "test"
sandbox_enabled = true
cpu_manager_policy = "static"
cpu_cfs_quota = true
name = "pool-03"
machine_type = "n1-standard-2"
node_locations = "${var.region}-b,${var.region}-c"
autoscaling = false
node_count = 2
disk_type = "pd-standard"
auto_upgrade = true
service_account = var.compute_engine_service_account
pod_range = "test"
sandbox_enabled = true
cpu_manager_policy = "static"
cpu_cfs_quota = true
local_ssd_ephemeral_count = 2
},
]

Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Then perform the following commands on the root folder:
| ip\_range\_services | The _name_ of the secondary subnet range to use for services | `string` | n/a | yes |
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
| maintenance\_exclusions | List of maintenance exclusions. A cluster can have up to three | `list(object({ name = string, start_time = string, end_time = string, exclusion_scope = string }))` | `[]` | no |
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-autopilot-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,8 @@ variable "fleet_project_grant_service_agent" {
type = bool
default = false
}
variable "local_ssd_ephemeral_count" {
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
1 change: 1 addition & 0 deletions modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Then perform the following commands on the root folder:
| ip\_range\_services | The _name_ of the secondary subnet range to use for services | `string` | n/a | yes |
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
| maintenance\_exclusions | List of maintenance exclusions. A cluster can have up to three | `list(object({ name = string, start_time = string, end_time = string, exclusion_scope = string }))` | `[]` | no |
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-autopilot-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,8 @@ variable "fleet_project_grant_service_agent" {
type = bool
default = false
}
variable "local_ssd_ephemeral_count" {
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ Then perform the following commands on the root folder:
| istio\_auth | (Beta) The authentication type between services in Istio. | `string` | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| logging\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,12 @@ resource "google_container_node_pool" "pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down Expand Up @@ -1006,6 +1012,12 @@ resource "google_container_node_pool" "windows_pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -844,3 +844,8 @@ variable "fleet_project_grant_service_agent" {
type = bool
default = false
}
variable "local_ssd_ephemeral_count" {
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Then perform the following commands on the root folder:
| istio\_auth | (Beta) The authentication type between services in Istio. | `string` | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| logging\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,12 @@ resource "google_container_node_pool" "pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down Expand Up @@ -930,6 +936,12 @@ resource "google_container_node_pool" "windows_pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -844,3 +844,8 @@ variable "fleet_project_grant_service_agent" {
type = bool
default = false
}
variable "local_ssd_ephemeral_count" {
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
1 change: 1 addition & 0 deletions modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ Then perform the following commands on the root folder:
| istio\_auth | (Beta) The authentication type between services in Istio. | `string` | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| logging\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,12 @@ resource "google_container_node_pool" "pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down Expand Up @@ -987,6 +993,12 @@ resource "google_container_node_pool" "windows_pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -814,3 +814,8 @@ variable "fleet_project_grant_service_agent" {
type = bool
default = false
}
variable "local_ssd_ephemeral_count" {
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ Then perform the following commands on the root folder:
| istio\_auth | (Beta) The authentication type between services in Istio. | `string` | `"AUTH_MUTUAL_TLS"` | no |
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | `bool` | `false` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
| local\_ssd\_ephemeral\_count | (Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size | `number` | `null` | no |
| logging\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,12 @@ resource "google_container_node_pool" "pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down Expand Up @@ -911,6 +917,12 @@ resource "google_container_node_pool" "windows_pools" {
disk_size_gb = lookup(each.value, "disk_size_gb", 100)
disk_type = lookup(each.value, "disk_type", "pd-standard")

dynamic "ephemeral_storage_local_ssd_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
local_ssd_count = ephemeral_storage_local_ssd_config.value
}
}
dynamic "ephemeral_storage_config" {
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
content {
Expand Down
5 changes: 5 additions & 0 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -814,3 +814,8 @@ variable "fleet_project_grant_service_agent" {
type = bool
default = false
}
variable "local_ssd_ephemeral_count" {
description = "(Optional) Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size"
type = number
default = null
}
Loading
Loading