Skip to content

Commit 85c0487

Browse files
authored
feat!: add data cache count (#2404)
Signed-off-by: drfaust92 <[email protected]>
1 parent 1b69e34 commit 85c0487

File tree

16 files changed

+78
-47
lines changed

16 files changed

+78
-47
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,10 @@ The node_pools variable takes the following parameters:
353353
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
354354
| insecure_kubelet_readonly_port_enabled | (boolean) Whether or not to enable the insecure Kubelet readonly port. | null | Optional |
355355
| key | The key required for the taint | | Required |
356-
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
357-
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
356+
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
357+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
358358
| local_ssd_ephemeral_storage_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
359+
| ephemeral_storage_local_ssd_data_cache_count | Number of raw-block local NVMe SSD disks to be attached to the node utilized for GKE Data Cache. | 0 | Optional |
359360
| local_nvme_ssd_count | Number of raw-block local NVMe SSD disks to be attached to the node.Each local SSD is 375 GB in size. If zero, it means no raw-block local NVMe SSD disks to be attached to the node. | 0 | Optional |
360361
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
361362
| min_cpu_platform | Minimum CPU platform to be used by the nodes in the pool. The nodes may be scheduled on the specified or newer CPU platform. | " " | Optional |

autogen/main/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,10 @@ The node_pools variable takes the following parameters:
228228
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
229229
| insecure_kubelet_readonly_port_enabled | (boolean) Whether or not to enable the insecure Kubelet readonly port. | null | Optional |
230230
| key | The key required for the taint | | Required |
231-
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
232-
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
231+
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
232+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
233233
| local_ssd_ephemeral_storage_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
234+
| ephemeral_storage_local_ssd_data_cache_count | Number of raw-block local NVMe SSD disks to be attached to the node utilized for GKE Data Cache. | 0 | Optional |
234235
{% if beta_cluster %}
235236
| local_ssd_ephemeral_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
236237
{% endif %}

autogen/main/cluster.tf.tmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,8 @@ locals {
863863
"local_ssd_encryption_mode",
864864
"max_run_duration",
865865
"flex_start",
866+
"local_ssd_ephemeral_storage_count",
867+
"ephemeral_storage_local_ssd_data_cache_count",
866868
]
867869
}
868870

@@ -1114,14 +1116,15 @@ resource "google_container_node_pool" "windows_pools" {
11141116
disk_type = lookup(each.value, "disk_type", "pd-standard")
11151117

11161118
dynamic "ephemeral_storage_local_ssd_config" {
1117-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
1119+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
11181120
content {
1119-
local_ssd_count = ephemeral_storage_local_ssd_config.value
1121+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
1122+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
11201123
}
11211124
}
11221125
{% if beta_cluster %}
11231126
dynamic "ephemeral_storage_config" {
1124-
for_each = lookup(each.value, "local_ssd_ephemeral_count",0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
1127+
for_each = lookup(each.value, "local_ssd_ephemeral_count", 0) > 0 ? [each.value.local_ssd_ephemeral_count] : []
11251128
content {
11261129
local_ssd_count = ephemeral_storage_config.value
11271130
}

cluster.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,10 @@ resource "google_container_node_pool" "pools" {
819819
disk_type = lookup(each.value, "disk_type", "pd-standard")
820820

821821
dynamic "ephemeral_storage_local_ssd_config" {
822-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
822+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
823823
content {
824-
local_ssd_count = ephemeral_storage_local_ssd_config.value
824+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
825+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
825826
}
826827
}
827828

@@ -1184,9 +1185,10 @@ resource "google_container_node_pool" "windows_pools" {
11841185
disk_type = lookup(each.value, "disk_type", "pd-standard")
11851186

11861187
dynamic "ephemeral_storage_local_ssd_config" {
1187-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
1188+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
11881189
content {
1189-
local_ssd_count = ephemeral_storage_local_ssd_config.value
1190+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
1191+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
11901192
}
11911193
}
11921194

modules/beta-private-cluster-update-variant/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,10 @@ The node_pools variable takes the following parameters:
406406
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
407407
| insecure_kubelet_readonly_port_enabled | (boolean) Whether or not to enable the insecure Kubelet readonly port. | null | Optional |
408408
| key | The key required for the taint | | Required |
409-
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
410-
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
409+
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
410+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
411411
| local_ssd_ephemeral_storage_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
412+
| ephemeral_storage_local_ssd_data_cache_count | Number of raw-block local NVMe SSD disks to be attached to the node utilized for GKE Data Cache. | 0 | Optional |
412413
| local_ssd_ephemeral_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
413414
| local_nvme_ssd_count | Number of raw-block local NVMe SSD disks to be attached to the node.Each local SSD is 375 GB in size. If zero, it means no raw-block local NVMe SSD disks to be attached to the node. | 0 | Optional |
414415
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ locals {
742742
"local_ssd_encryption_mode",
743743
"max_run_duration",
744744
"flex_start",
745+
"local_ssd_ephemeral_storage_count",
746+
"ephemeral_storage_local_ssd_data_cache_count",
745747
]
746748
}
747749

@@ -970,9 +972,10 @@ resource "google_container_node_pool" "pools" {
970972
disk_type = lookup(each.value, "disk_type", "pd-standard")
971973

972974
dynamic "ephemeral_storage_local_ssd_config" {
973-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
975+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
974976
content {
975-
local_ssd_count = ephemeral_storage_local_ssd_config.value
977+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
978+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
976979
}
977980
}
978981
dynamic "ephemeral_storage_config" {
@@ -1349,9 +1352,10 @@ resource "google_container_node_pool" "windows_pools" {
13491352
disk_type = lookup(each.value, "disk_type", "pd-standard")
13501353

13511354
dynamic "ephemeral_storage_local_ssd_config" {
1352-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
1355+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
13531356
content {
1354-
local_ssd_count = ephemeral_storage_local_ssd_config.value
1357+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
1358+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
13551359
}
13561360
}
13571361
dynamic "ephemeral_storage_config" {

modules/beta-private-cluster/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,10 @@ The node_pools variable takes the following parameters:
384384
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
385385
| insecure_kubelet_readonly_port_enabled | (boolean) Whether or not to enable the insecure Kubelet readonly port. | null | Optional |
386386
| key | The key required for the taint | | Required |
387-
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
388-
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
387+
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
388+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
389389
| local_ssd_ephemeral_storage_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
390+
| ephemeral_storage_local_ssd_data_cache_count | Number of raw-block local NVMe SSD disks to be attached to the node utilized for GKE Data Cache. | 0 | Optional |
390391
| local_ssd_ephemeral_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
391392
| local_nvme_ssd_count | Number of raw-block local NVMe SSD disks to be attached to the node.Each local SSD is 375 GB in size. If zero, it means no raw-block local NVMe SSD disks to be attached to the node. | 0 | Optional |
392393
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |

modules/beta-private-cluster/cluster.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,10 @@ resource "google_container_node_pool" "pools" {
886886
disk_type = lookup(each.value, "disk_type", "pd-standard")
887887

888888
dynamic "ephemeral_storage_local_ssd_config" {
889-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
889+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
890890
content {
891-
local_ssd_count = ephemeral_storage_local_ssd_config.value
891+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
892+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
892893
}
893894
}
894895
dynamic "ephemeral_storage_config" {
@@ -1264,9 +1265,10 @@ resource "google_container_node_pool" "windows_pools" {
12641265
disk_type = lookup(each.value, "disk_type", "pd-standard")
12651266

12661267
dynamic "ephemeral_storage_local_ssd_config" {
1267-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
1268+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
12681269
content {
1269-
local_ssd_count = ephemeral_storage_local_ssd_config.value
1270+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
1271+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
12701272
}
12711273
}
12721274
dynamic "ephemeral_storage_config" {

modules/beta-public-cluster-update-variant/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,10 @@ The node_pools variable takes the following parameters:
392392
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
393393
| insecure_kubelet_readonly_port_enabled | (boolean) Whether or not to enable the insecure Kubelet readonly port. | null | Optional |
394394
| key | The key required for the taint | | Required |
395-
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
396-
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
395+
| logging_variant | The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT. | DEFAULT | Optional |
396+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node and may be used as a `hostpath` volume or a `local` PersistentVolume. | 0 | Optional |
397397
| local_ssd_ephemeral_storage_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
398+
| ephemeral_storage_local_ssd_data_cache_count | Number of raw-block local NVMe SSD disks to be attached to the node utilized for GKE Data Cache. | 0 | Optional |
398399
| local_ssd_ephemeral_count | The amount of local SSD disks that will be attached to each cluster node and assigned as scratch space as an `emptyDir` volume. If unspecified, ephemeral storage is backed by the cluster node boot disk. | 0 | Optional |
399400
| local_nvme_ssd_count | Number of raw-block local NVMe SSD disks to be attached to the node.Each local SSD is 375 GB in size. If zero, it means no raw-block local NVMe SSD disks to be attached to the node. | 0 | Optional |
400401
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,8 @@ locals {
720720
"local_ssd_encryption_mode",
721721
"max_run_duration",
722722
"flex_start",
723+
"local_ssd_ephemeral_storage_count",
724+
"ephemeral_storage_local_ssd_data_cache_count",
723725
]
724726
}
725727

@@ -948,9 +950,10 @@ resource "google_container_node_pool" "pools" {
948950
disk_type = lookup(each.value, "disk_type", "pd-standard")
949951

950952
dynamic "ephemeral_storage_local_ssd_config" {
951-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
953+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
952954
content {
953-
local_ssd_count = ephemeral_storage_local_ssd_config.value
955+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
956+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
954957
}
955958
}
956959
dynamic "ephemeral_storage_config" {
@@ -1327,9 +1330,10 @@ resource "google_container_node_pool" "windows_pools" {
13271330
disk_type = lookup(each.value, "disk_type", "pd-standard")
13281331

13291332
dynamic "ephemeral_storage_local_ssd_config" {
1330-
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 ? [each.value.local_ssd_ephemeral_storage_count] : []
1333+
for_each = lookup(each.value, "local_ssd_ephemeral_storage_count", 0) > 0 || lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0) > 0 ? [1] : []
13311334
content {
1332-
local_ssd_count = ephemeral_storage_local_ssd_config.value
1335+
local_ssd_count = lookup(each.value, "local_ssd_ephemeral_storage_count", 0)
1336+
data_cache_count = lookup(each.value, "ephemeral_storage_local_ssd_data_cache_count", 0)
13331337
}
13341338
}
13351339
dynamic "ephemeral_storage_config" {

0 commit comments

Comments
 (0)