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 @@ -184,6 +184,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
8 changes: 8 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,14 @@ 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")

{% if not beta_cluster %}
apeabody marked this conversation as resolved.
Show resolved Hide resolved
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
}
}
{% endif %}
{% 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
7 changes: 7 additions & 0 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -874,3 +874,10 @@ variable "fleet_project_grant_service_agent" {
default = false
}
{% endif %}
{% if not beta_cluster %}
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
}
{% endif %}
alvicsam marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 12 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,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 @@ -782,6 +788,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
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,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
12 changes: 12 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,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 @@ -877,6 +883,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
5 changes: 5 additions & 0 deletions modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -739,3 +739,8 @@ variable "fleet_project" {
type = string
default = null
}
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/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,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
12 changes: 12 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,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 @@ -801,6 +807,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
5 changes: 5 additions & 0 deletions modules/private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -739,3 +739,8 @@ variable "fleet_project" {
type = string
default = null
}
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
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -709,3 +709,8 @@ variable "fleet_project" {
type = string
default = null
}
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
}