Skip to content

Commit

Permalink
chore(CI): migrate remaining kitchen tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody committed Jan 16, 2025
1 parent 8098489 commit f17a150
Show file tree
Hide file tree
Showing 32 changed files with 1,466 additions and 849 deletions.
62 changes: 0 additions & 62 deletions .kitchen.yml

This file was deleted.

208 changes: 101 additions & 107 deletions build/int.cloudbuild.yaml

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions test/fixtures/deploy_service/example.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,17 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
locals {
cluster_index = 1
}

module "example" {
source = "../../../examples/deploy_service"

project_id = var.project_ids[0]
project_id = var.project_ids[local.cluster_index]
cluster_name_suffix = "-${random_string.suffix.result}"
region = var.region
network = google_compute_network.main.name
subnetwork = google_compute_subnetwork.main.name
ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name
ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name
compute_engine_service_account = var.compute_engine_service_accounts[0]
compute_engine_service_account = var.compute_engine_service_accounts[local.cluster_index]
}

4 changes: 2 additions & 2 deletions test/fixtures/deploy_service/network.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@ resource "random_string" "suffix" {
}

provider "google" {
project = var.project_ids[0]
project = var.project_ids[local.cluster_index]
}

resource "google_compute_network" "main" {
Expand Down
10 changes: 9 additions & 1 deletion test/fixtures/simple_regional_with_gateway_api/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,3 +83,11 @@ output "service_account" {
output "registry_project_ids" {
value = var.registry_project_ids
}

output "random_string" {
value = random_string.suffix.result
}

output "compute_engine_service_account" {
value = var.compute_engine_service_accounts[local.cluster_index]
}
10 changes: 9 additions & 1 deletion test/fixtures/simple_regional_with_ipv6/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,3 +83,11 @@ output "service_account" {
output "registry_project_ids" {
value = var.registry_project_ids
}

output "random_string" {
value = random_string.suffix.result
}

output "compute_engine_service_account" {
value = var.compute_engine_service_accounts[local.cluster_index]
}
8 changes: 6 additions & 2 deletions test/fixtures/stub_domains_upstream_nameservers/example.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,6 +14,10 @@
* limitations under the License.
*/

locals {
compute_engine_service_account = var.compute_engine_service_accounts[1]
}

module "example" {
source = "../../../examples/stub_domains_upstream_nameservers"

Expand All @@ -24,6 +28,6 @@ module "example" {
subnetwork = google_compute_subnetwork.main.name
ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name
ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name
compute_engine_service_account = var.compute_engine_service_accounts[1]
compute_engine_service_account = local.compute_engine_service_account
}

10 changes: 9 additions & 1 deletion test/fixtures/stub_domains_upstream_nameservers/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,3 +56,11 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = module.example.service_account
}

output "random_string" {
value = random_string.suffix.result
}

output "compute_engine_service_account" {
value = local.compute_engine_service_account
}
11 changes: 10 additions & 1 deletion test/fixtures/workload_metadata_config/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 Google LLC
* Copyright 2018-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,3 +56,12 @@ output "service_account" {
description = "The service account to default running nodes as if not overridden in `node_pools`."
value = module.example.service_account
}

output "random_string" {
value = random_string.suffix.result
}

output "registry_project_ids" {
description = "Projects to use for granting access to GCR registries, if requested"
value = var.registry_project_ids
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"clusterIpv4Cidr": "192.168.0.0/18",
"clusterIpv4CidrBlock": "192.168.0.0/18",
"clusterSecondaryRangeName": "cft-gke-test-pods-qwc4",
"defaultPodIpv4RangeUtilization": 0.0156,
"podCidrOverprovisionConfig": {},
"servicesIpv4Cidr": "192.168.64.0/18",
"servicesIpv4CidrBlock": "192.168.64.0/18",
Expand Down
1 change: 0 additions & 1 deletion test/integration/node_pool/testdata/TestNodePool.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"clusterIpv4Cidr": "192.168.0.0/18",
"clusterIpv4CidrBlock": "192.168.0.0/18",
"clusterSecondaryRangeName": "cft-gke-test-pods-RANDOM_STRING",
"defaultPodIpv4RangeUtilization": 0.0624,
"podCidrOverprovisionConfig": {},
"servicesIpv4Cidr": "192.168.64.0/18",
"servicesIpv4CidrBlock": "192.168.64.0/18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"clusterIpv4Cidr": "192.168.0.0/18",
"clusterIpv4CidrBlock": "192.168.0.0/18",
"clusterSecondaryRangeName": "cft-gke-test-pods-44kc",
"defaultPodIpv4RangeUtilization": 0.0469,
"podCidrOverprovisionConfig": {},
"servicesIpv4Cidr": "192.168.64.0/18",
"servicesIpv4CidrBlock": "192.168.64.0/18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"clusterIpv4Cidr": "192.168.0.0/18",
"clusterIpv4CidrBlock": "192.168.0.0/18",
"clusterSecondaryRangeName": "cft-gke-test-pods-44kc",
"defaultPodIpv4RangeUtilization": 0.0469,
"podCidrOverprovisionConfig": {},
"servicesIpv4Cidr": "192.168.64.0/18",
"servicesIpv4CidrBlock": "192.168.64.0/18",
Expand Down
Loading

0 comments on commit f17a150

Please sign in to comment.