From 5a64eea79301a159e71ad35757741e26402f9769 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Thu, 12 May 2022 12:10:50 -0700 Subject: [PATCH] fix: various fix to address CI issues (#1248) fix: add output "service_account" to simple_zonal chore: convert remaining examples/CI to COS_CONTAINERD --- examples/node_pool/main.tf | 1 - examples/node_pool_update_variant/main.tf | 1 - examples/node_pool_update_variant_beta/main.tf | 1 - examples/node_pool_update_variant_public_beta/main.tf | 1 - examples/regional_private_node_pool_oauth_scopes/main.tf | 1 - examples/safer_cluster_iap_bastion/apis.tf | 1 + examples/simple_regional_private/main.tf | 1 - test/fixtures/sandbox_enabled/example.tf | 1 - test/fixtures/simple_zonal/outputs.tf | 5 +++++ test/integration/node_pool/controls/gcloud.rb | 2 +- test/integration/simple_autopilot_private/controls/gcloud.rb | 2 +- 11 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/node_pool/main.tf b/examples/node_pool/main.tf index 445d5e039b..c6159e18eb 100644 --- a/examples/node_pool/main.tf +++ b/examples/node_pool/main.tf @@ -60,7 +60,6 @@ module "gke" { accelerator_count = 1 accelerator_type = "nvidia-tesla-a100" gpu_partition_size = "1g.5gb" - image_type = "COS" auto_repair = false service_account = var.compute_engine_service_account }, diff --git a/examples/node_pool_update_variant/main.tf b/examples/node_pool_update_variant/main.tf index 05cc542aa6..7fd842f7a0 100644 --- a/examples/node_pool_update_variant/main.tf +++ b/examples/node_pool_update_variant/main.tf @@ -73,7 +73,6 @@ module "gke" { disk_type = "pd-standard" accelerator_count = 1 accelerator_type = "nvidia-tesla-p4" - image_type = "COS" auto_repair = false service_account = var.compute_engine_service_account }, diff --git a/examples/node_pool_update_variant_beta/main.tf b/examples/node_pool_update_variant_beta/main.tf index da631a7b63..b9710fca15 100644 --- a/examples/node_pool_update_variant_beta/main.tf +++ b/examples/node_pool_update_variant_beta/main.tf @@ -78,7 +78,6 @@ module "gke" { disk_type = "pd-standard" accelerator_count = 1 accelerator_type = "nvidia-tesla-p4" - image_type = "COS" auto_repair = false service_account = var.compute_engine_service_account }, diff --git a/examples/node_pool_update_variant_public_beta/main.tf b/examples/node_pool_update_variant_public_beta/main.tf index b6863e7db9..f369cfb7dd 100644 --- a/examples/node_pool_update_variant_public_beta/main.tf +++ b/examples/node_pool_update_variant_public_beta/main.tf @@ -74,7 +74,6 @@ module "gke" { disk_type = "pd-standard" accelerator_count = 1 accelerator_type = "nvidia-tesla-p4" - image_type = "COS" auto_repair = false service_account = var.compute_engine_service_account }, diff --git a/examples/regional_private_node_pool_oauth_scopes/main.tf b/examples/regional_private_node_pool_oauth_scopes/main.tf index b843cb7234..b33c136d56 100644 --- a/examples/regional_private_node_pool_oauth_scopes/main.tf +++ b/examples/regional_private_node_pool_oauth_scopes/main.tf @@ -48,7 +48,6 @@ module "gke" { max_count = 1 disk_size_gb = 100 disk_type = "pd-ssd" - image_type = "COS" auto_repair = true auto_upgrade = false preemptible = false diff --git a/examples/safer_cluster_iap_bastion/apis.tf b/examples/safer_cluster_iap_bastion/apis.tf index bf4803cdfa..2b4aa09e14 100644 --- a/examples/safer_cluster_iap_bastion/apis.tf +++ b/examples/safer_cluster_iap_bastion/apis.tf @@ -22,6 +22,7 @@ module "enabled_google_apis" { disable_services_on_destroy = false activate_apis = [ + "serviceusage.googleapis.com", "iam.googleapis.com", "compute.googleapis.com", "logging.googleapis.com", diff --git a/examples/simple_regional_private/main.tf b/examples/simple_regional_private/main.tf index 51a5ee846e..15c24d8ed8 100644 --- a/examples/simple_regional_private/main.tf +++ b/examples/simple_regional_private/main.tf @@ -58,7 +58,6 @@ module "gke" { local_ssd_count = 0 disk_size_gb = 100 disk_type = "pd-standard" - image_type = "COS" auto_repair = true auto_upgrade = true service_account = var.compute_engine_service_account diff --git a/test/fixtures/sandbox_enabled/example.tf b/test/fixtures/sandbox_enabled/example.tf index 01f3913ce9..ddd9476880 100644 --- a/test/fixtures/sandbox_enabled/example.tf +++ b/test/fixtures/sandbox_enabled/example.tf @@ -33,7 +33,6 @@ module "example" { node_pools = [ { name = "default-node-pool" - image_type = "COS_CONTAINERD" machine_type = "n1-standard-2" }, ] diff --git a/test/fixtures/simple_zonal/outputs.tf b/test/fixtures/simple_zonal/outputs.tf index b0f467899c..403576809a 100644 --- a/test/fixtures/simple_zonal/outputs.tf +++ b/test/fixtures/simple_zonal/outputs.tf @@ -51,3 +51,8 @@ output "ca_certificate" { value = module.example.ca_certificate sensitive = true } + +output "service_account" { + description = "The service account to default running nodes as if not overridden in `node_pools`." + value = module.example.service_account +} diff --git a/test/integration/node_pool/controls/gcloud.rb b/test/integration/node_pool/controls/gcloud.rb index 1b2a6e24de..d7f630ebde 100644 --- a/test/integration/node_pool/controls/gcloud.rb +++ b/test/integration/node_pool/controls/gcloud.rb @@ -297,7 +297,7 @@ including( "name" => "pool-02", "config" => including( - "imageType" => "COS", + "imageType" => "COS_CONTAINERD", ), ) ) diff --git a/test/integration/simple_autopilot_private/controls/gcloud.rb b/test/integration/simple_autopilot_private/controls/gcloud.rb index 6ad7afecd9..124f39bb90 100644 --- a/test/integration/simple_autopilot_private/controls/gcloud.rb +++ b/test/integration/simple_autopilot_private/controls/gcloud.rb @@ -32,7 +32,7 @@ describe "cluster" do it "is running" do - expect(data['status']).to eq 'RUNNING' + expect(data['status']).to eq('RUNNING').or eq('RECONCILING') end it "is autopilot" do