Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Terraform support for GKE enable_nested_virtualization option #10558

Merged
merged 11 commits into from
May 2, 2024

Conversation

lornaluo
Copy link
Contributor

@lornaluo lornaluo commented Apr 30, 2024

This PR adds the advanced_machine_features.enable_nested_virtualization field in node_config. It enables the user to use terraform to config nested VMs with GKE clusters.

I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description].
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

container: added `enable_nested_virtualization` field to `google_container_node_pool` and `google_container_cluster` resource.

@github-actions github-actions bot requested a review from shuyama1 April 30, 2024 07:51
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@shuyama1, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 30, 2024
@lornaluo lornaluo changed the title Add Terraform support for GKE nested_virtualization option Add Terraform support for GKE enable_nested_virtualization option Apr 30, 2024
@modular-magician modular-magician added service/container and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 30, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 74 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 3 files changed, 74 insertions(+), 2 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • container

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$
View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the field just got released today in the latest version v0.177.0. You'll need to bump google.golang.org/api to the latest version in mmv1/third_party/terraform/go.mod.erb

@github-actions github-actions bot requested a review from shuyama1 April 30, 2024 22:43
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 30, 2024
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 1, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 123 insertions(+), 52 deletions(-))
google-beta provider: Diff ( 5 files changed, 123 insertions(+), 52 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_container_cluster (351 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_container_cluster" "primary" {
  node_pool {
    node_config {
      advanced_machine_features {
        enable_nested_virtualization = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3631
Passed tests: 3264
Skipped tests: 366
Affected tests: 1

Click here to see the affected service packages
all service packages are affected

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerNodePool_nestedVirtualization

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerNodePool_nestedVirtualization[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM!. We have google_container_cluster and google_container_node_pool sharing the node_config schema. Would you mind also adding a test coverage in google_container_cluster tests according to the missing test report. You can just simply modify an existing test to include the field. Thanks!

@github-actions github-actions bot requested a review from shuyama1 May 2, 2024 19:09
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 86 insertions(+), 35 deletions(-))
google-beta provider: Diff ( 5 files changed, 86 insertions(+), 35 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_container_cluster (351 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_container_cluster" "primary" {
  node_pool {
    node_config {
      advanced_machine_features {
        enable_nested_virtualization = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 135 insertions(+), 56 deletions(-))
google-beta provider: Diff ( 6 files changed, 135 insertions(+), 56 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3635
Passed tests: 3264
Skipped tests: 369
Affected tests: 2

Click here to see the affected service packages
all service packages are affected

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy|TestAccContainerCluster_withAdvancedMachineFeaturesInNodePool

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy[Debug log]
TestAccContainerCluster_withAdvancedMachineFeaturesInNodePool[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 135 insertions(+), 56 deletions(-))
google-beta provider: Diff ( 6 files changed, 135 insertions(+), 56 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3637
Passed tests: 3268
Skipped tests: 369
Affected tests: 0

Click here to see the affected service packages
all service packages are affected

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@shuyama1 shuyama1 merged commit 2bc1aa4 into GoogleCloudPlatform:main May 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants