Skip to content

Commit f7c2ed9

Browse files
fl0-mmatilotecloud-pharaoh
authored
feat: adds local_nvme_ssd_block_config to beta-public-cluster (#1912)
Co-authored-by: Mateusz Jędrzejewski <[email protected]> Co-authored-by: Mateusz Jędrzejewski <[email protected]> Co-authored-by: Amina Mansour <[email protected]>
1 parent da0476a commit f7c2ed9

File tree

16 files changed

+116
-2
lines changed

16 files changed

+116
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ The node_pools variable takes the following parameters:
296296
| key | The key required for the taint | | Required |
297297
| 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 |
298298
| 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 |
299+
| 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 |
300+
| 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 |
299301
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
300302
| 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 |
301303
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

autogen/main/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ The node_pools variable takes the following parameters:
211211
| key | The key required for the taint | | Required |
212212
| 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 |
213213
| 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 |
214-
{% if beta_cluster %}
215214
| 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 |
216-
{% endif %}
215+
| 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 |
217216
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
218217
| 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 |
219218
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

autogen/main/cluster.tf.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,13 @@ resource "google_container_node_pool" "windows_pools" {
849849
}
850850
{% endif %}
851851

852+
dynamic "local_nvme_ssd_block_config" {
853+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
854+
content {
855+
local_ssd_count = local_nvme_ssd_block_config.value
856+
}
857+
}
858+
852859
service_account = lookup(
853860
each.value,
854861
"service_account",

cluster.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,13 @@ resource "google_container_node_pool" "pools" {
567567
disk_type = lookup(each.value, "disk_type", "pd-standard")
568568

569569

570+
dynamic "local_nvme_ssd_block_config" {
571+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
572+
content {
573+
local_ssd_count = local_nvme_ssd_block_config.value
574+
}
575+
}
576+
570577
service_account = lookup(
571578
each.value,
572579
"service_account",
@@ -776,6 +783,13 @@ resource "google_container_node_pool" "windows_pools" {
776783
disk_type = lookup(each.value, "disk_type", "pd-standard")
777784

778785

786+
dynamic "local_nvme_ssd_block_config" {
787+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
788+
content {
789+
local_ssd_count = local_nvme_ssd_block_config.value
790+
}
791+
}
792+
779793
service_account = lookup(
780794
each.value,
781795
"service_account",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ The node_pools variable takes the following parameters:
361361
| 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 |
362362
| 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 |
363363
| 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 |
364+
| 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 |
364365
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
365366
| 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 |
366367
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,13 @@ resource "google_container_node_pool" "pools" {
733733
}
734734
}
735735

736+
dynamic "local_nvme_ssd_block_config" {
737+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
738+
content {
739+
local_ssd_count = local_nvme_ssd_block_config.value
740+
}
741+
}
742+
736743
service_account = lookup(
737744
each.value,
738745
"service_account",
@@ -968,6 +975,13 @@ resource "google_container_node_pool" "windows_pools" {
968975
}
969976
}
970977

978+
dynamic "local_nvme_ssd_block_config" {
979+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
980+
content {
981+
local_ssd_count = local_nvme_ssd_block_config.value
982+
}
983+
}
984+
971985
service_account = lookup(
972986
each.value,
973987
"service_account",

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ The node_pools variable takes the following parameters:
339339
| 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 |
340340
| 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 |
341341
| 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 |
342+
| 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 |
342343
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
343344
| 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 |
344345
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

modules/beta-private-cluster/cluster.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,13 @@ resource "google_container_node_pool" "pools" {
658658
}
659659
}
660660

661+
dynamic "local_nvme_ssd_block_config" {
662+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
663+
content {
664+
local_ssd_count = local_nvme_ssd_block_config.value
665+
}
666+
}
667+
661668
service_account = lookup(
662669
each.value,
663670
"service_account",
@@ -892,6 +899,13 @@ resource "google_container_node_pool" "windows_pools" {
892899
}
893900
}
894901

902+
dynamic "local_nvme_ssd_block_config" {
903+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
904+
content {
905+
local_ssd_count = local_nvme_ssd_block_config.value
906+
}
907+
}
908+
895909
service_account = lookup(
896910
each.value,
897911
"service_account",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ The node_pools variable takes the following parameters:
348348
| 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 |
349349
| 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 |
350350
| 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 |
351+
| 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 |
351352
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
352353
| 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 |
353354
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,13 @@ resource "google_container_node_pool" "pools" {
714714
}
715715
}
716716

717+
dynamic "local_nvme_ssd_block_config" {
718+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
719+
content {
720+
local_ssd_count = local_nvme_ssd_block_config.value
721+
}
722+
}
723+
717724
service_account = lookup(
718725
each.value,
719726
"service_account",
@@ -949,6 +956,13 @@ resource "google_container_node_pool" "windows_pools" {
949956
}
950957
}
951958

959+
dynamic "local_nvme_ssd_block_config" {
960+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
961+
content {
962+
local_ssd_count = local_nvme_ssd_block_config.value
963+
}
964+
}
965+
952966
service_account = lookup(
953967
each.value,
954968
"service_account",

modules/beta-public-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ The node_pools variable takes the following parameters:
326326
| 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 |
327327
| 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 |
328328
| 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 |
329+
| 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 |
329330
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
330331
| 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 |
331332
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

modules/beta-public-cluster/cluster.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,13 @@ resource "google_container_node_pool" "pools" {
639639
}
640640
}
641641

642+
dynamic "local_nvme_ssd_block_config" {
643+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
644+
content {
645+
local_ssd_count = local_nvme_ssd_block_config.value
646+
}
647+
}
648+
642649
service_account = lookup(
643650
each.value,
644651
"service_account",
@@ -873,6 +880,13 @@ resource "google_container_node_pool" "windows_pools" {
873880
}
874881
}
875882

883+
dynamic "local_nvme_ssd_block_config" {
884+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
885+
content {
886+
local_ssd_count = local_nvme_ssd_block_config.value
887+
}
888+
}
889+
876890
service_account = lookup(
877891
each.value,
878892
"service_account",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ The node_pools variable takes the following parameters:
331331
| key | The key required for the taint | | Required |
332332
| 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 |
333333
| 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 |
334+
| 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 |
335+
| 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 |
334336
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
335337
| 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 |
336338
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,13 @@ resource "google_container_node_pool" "pools" {
661661
disk_type = lookup(each.value, "disk_type", "pd-standard")
662662

663663

664+
dynamic "local_nvme_ssd_block_config" {
665+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
666+
content {
667+
local_ssd_count = local_nvme_ssd_block_config.value
668+
}
669+
}
670+
664671
service_account = lookup(
665672
each.value,
666673
"service_account",
@@ -871,6 +878,13 @@ resource "google_container_node_pool" "windows_pools" {
871878
disk_type = lookup(each.value, "disk_type", "pd-standard")
872879

873880

881+
dynamic "local_nvme_ssd_block_config" {
882+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
883+
content {
884+
local_ssd_count = local_nvme_ssd_block_config.value
885+
}
886+
}
887+
874888
service_account = lookup(
875889
each.value,
876890
"service_account",

modules/private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ The node_pools variable takes the following parameters:
309309
| key | The key required for the taint | | Required |
310310
| 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 |
311311
| 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 |
312+
| 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 |
313+
| 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 |
312314
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
313315
| 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 |
314316
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count. Cannot be used with total limits. | 100 | Optional |

modules/private-cluster/cluster.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,13 @@ resource "google_container_node_pool" "pools" {
586586
disk_type = lookup(each.value, "disk_type", "pd-standard")
587587

588588

589+
dynamic "local_nvme_ssd_block_config" {
590+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
591+
content {
592+
local_ssd_count = local_nvme_ssd_block_config.value
593+
}
594+
}
595+
589596
service_account = lookup(
590597
each.value,
591598
"service_account",
@@ -795,6 +802,13 @@ resource "google_container_node_pool" "windows_pools" {
795802
disk_type = lookup(each.value, "disk_type", "pd-standard")
796803

797804

805+
dynamic "local_nvme_ssd_block_config" {
806+
for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : []
807+
content {
808+
local_ssd_count = local_nvme_ssd_block_config.value
809+
}
810+
}
811+
798812
service_account = lookup(
799813
each.value,
800814
"service_account",

0 commit comments

Comments
 (0)