From e298e7492c32d61a1387912c3525cd610434912d Mon Sep 17 00:00:00 2001 From: Ilia Lazebnik Date: Mon, 5 Aug 2024 19:40:40 -0400 Subject: [PATCH] feat: support enable_nested_virtualization (#2012) Co-authored-by: Andrew Peabody --- README.md | 1 + autogen/main/README.md | 1 + autogen/main/cluster.tf.tmpl | 5 ++-- cluster.tf | 10 +++++--- examples/node_pool/main.tf | 6 +++++ .../README.md | 1 + .../cluster.tf | 10 +++++--- modules/beta-private-cluster/README.md | 1 + modules/beta-private-cluster/cluster.tf | 10 +++++--- .../README.md | 1 + .../cluster.tf | 10 +++++--- modules/beta-public-cluster/README.md | 1 + modules/beta-public-cluster/cluster.tf | 10 +++++--- .../private-cluster-update-variant/README.md | 1 + .../private-cluster-update-variant/cluster.tf | 10 +++++--- modules/private-cluster/README.md | 1 + modules/private-cluster/cluster.tf | 10 +++++--- test/integration/node_pool/controls/gcloud.rb | 25 +++++++++++++++++-- 18 files changed, 82 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index c613c058f1..fb7c7d10c0 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/autogen/main/README.md b/autogen/main/README.md index 9ac2b3e48f..89b4864b62 100644 --- a/autogen/main/README.md +++ b/autogen/main/README.md @@ -229,6 +229,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 54fe2bd5c1..f6ce8f76c4 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -992,9 +992,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/cluster.tf b/cluster.tf index 8d2d83198e..adbe5b64a5 100644 --- a/cluster.tf +++ b/cluster.tf @@ -697,9 +697,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -970,9 +971,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/examples/node_pool/main.tf b/examples/node_pool/main.tf index 8da1827934..1bb3bdba37 100644 --- a/examples/node_pool/main.tf +++ b/examples/node_pool/main.tf @@ -87,6 +87,12 @@ module "gke" { service_account = var.compute_engine_service_account queued_provisioning = true }, + { + name = "pool-05" + machine_type = "n1-standard-2" + node_count = 1 + enable_nested_virtualization = true + }, ] node_pools_metadata = { diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index ca27dee35c..cc7b787385 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -387,6 +387,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 08f0929170..16c11ede8a 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -868,9 +868,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -1155,9 +1156,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index aad2316a01..aba9715309 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -365,6 +365,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 4293081a77..4b2f5e73c8 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -788,9 +788,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -1074,9 +1075,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index b93d287d4f..6266e63997 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -373,6 +373,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index f86da1000f..1e15c7cff5 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -847,9 +847,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -1134,9 +1135,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 0b058af246..b7b11e85bd 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -351,6 +351,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 29f4d951ed..5bb1c0ce50 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -767,9 +767,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -1053,9 +1054,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 65b6115096..c2579846a7 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -364,6 +364,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 12705fc437..07b47d971b 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -798,9 +798,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -1072,9 +1073,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 7b0f85eac3..911ad288f9 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -342,6 +342,7 @@ The node_pools variable takes the following parameters: | max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional | | strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE` or `BLUE_GREEN` | "SURGE" | Optional | | threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional | +| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional | | max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional | | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional | | node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional | diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 907ac71839..dda05ae038 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -718,9 +718,10 @@ resource "google_container_node_pool" "pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } @@ -991,9 +992,10 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "advanced_machine_features" { - for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : [] content { - threads_per_core = lookup(each.value, "threads_per_core", 0) + threads_per_core = lookup(each.value, "threads_per_core", 0) + enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null) } } diff --git a/test/integration/node_pool/controls/gcloud.rb b/test/integration/node_pool/controls/gcloud.rb index e3da9d06b2..1d4437a127 100644 --- a/test/integration/node_pool/controls/gcloud.rb +++ b/test/integration/node_pool/controls/gcloud.rb @@ -62,8 +62,8 @@ describe "node pools" do let(:node_pools) { data['nodePools'].reject { |p| p['name'] == "default-pool" || p['name'] =~ %r{^nap-.*} } } - it "has 4" do - expect(node_pools.count).to eq 4 + it "has 5" do + expect(node_pools.count).to eq 5 end describe "pool-01" do @@ -514,6 +514,27 @@ ) end end + + describe "pool-05" do + it "exists" do + expect(data['nodePools']).to include( + including( + "name" => "pool-05", + ) + ) + end + + it "has enable_nested_virtualization enabled" do + expect(data['nodePools']).not_to include( + including( + "name" => "pool-05", + "advanced_machine_features" => including( + "enable_nested_virtualization" => true, + ), + ) + ) + end + end end end