Skip to content

Added windows_node_config support for GKE Clusters #8265

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

Conversation

pranavparuchuri
Copy link

Adding support for windows_node_config in gke cluster node_pools. This is required to specify windows 2022 as os version for the nodes. The corresponding issue is hashicorp/terraform-provider-google#14979

If this PR is for Terraform, I acknowledge that I have:

  • [ X] 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. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • [X ] 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).
  • [X ] Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • [X ] 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)

GKE: added `node_config.windows_node_config` field to `google_container_node_pool` resource

@google-cla
Copy link

google-cla bot commented Jul 4, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@modular-magician modular-magician requested a review from roaks3 July 4, 2023 15:45
@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @roaks3, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jul 4, 2023
@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.

Terraform GA: Diff ( 4 files changed, 160 insertions(+))
Terraform Beta: Diff ( 4 files changed, 160 insertions(+))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_container_cluster (2 total tests)
Untested fields: node_config.windows_node_config.osversion, node_pool.node_config.windows_node_config.osversion

Please add acceptance tests which include these fields.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2837
Passed tests 2501
Skipped tests: 295
Affected tests: 41

Action taken

Found 41 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerNodePool_ephemeralStorageLocalSsdConfig|TestAccContainerNodePool_ephemeralStorageConfig|TestAccContainerNodePool_withSoleTenantConfig|TestAccContainerNodePool_shieldedInstanceConfig|TestAccContainerNodePool_EmptyGuestAccelerator|TestAccContainerCluster_withNodePoolNodeConfig|TestAccContainerCluster_withSoleTenantGroup|TestAccContainerNodePool_012_ConfigModeAttr|TestAccContainerCluster_withILBSubsetting|TestAccContainerCluster_withConfidentialNodes|TestAccContainerNodePool_withNodeConfigScopeAlias|TestAccContainerNodePool_withManagement|TestAccContainerNodePool_withGPU|TestAccContainerNodePool_withWindowsNodeConfig|TestAccContainerNodePool_withEnablePrivateNodesToggle|TestAccContainerNodePool_withLinuxNodeConfig|TestAccContainerNodePool_withSandboxConfig|TestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withReservationAffinitySpecific|TestAccContainerNodePool_withNodeConfig|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccContainerNodePool_withReservationAffinity|TestAccContainerCluster_backend|TestAccContainerNodePool_withLoggingVariantUpdates|TestAccContainerCluster_withBootDiskKmsKey|TestAccContainerCluster_withSandboxConfig|TestAccContainerCluster_withNodeConfigReservationAffinitySpecific|TestAccContainerCluster_withNodeConfigReservationAffinity|TestAccContainerCluster_withNodeConfigShieldedInstanceConfig|TestAccContainerCluster_withNodeConfigScopeAlias|TestAccContainerCluster_withLoggingVariantInNodePool|TestAccContainerCluster_withLoggingVariantInNodeConfig|TestAccContainerCluster_withWorkloadMetadataConfig|TestAccContainerNodePool_localNvmeSsdBlockConfig|TestAccContainerNodePool_withNetworkConfig|TestAccContainerNodePool_threadsPerCore|TestAccContainerNodePool_gvnic|TestAccContainerCluster_withNodeConfig|TestAccContainerNodePool_compactPlacement|TestAccContainerNodePool_gcfsConfig|TestAccComputeFirewallPolicyRule_multipleRules

Get to know how VCR tests work

@Al77056
Copy link

Al77056 commented Jul 11, 2023

Based on changes in this commit that adds support for windows node pool provisioning, I feel the proposed changes isn't sufficient.

It seems to me that the correct approach would be introducing a local map such as "node_pools_windows_node_configs_osVersion", and define the "windows_node_config" in "windows_pools" similar to the "linux_node_config" in "pools".

@g-awmalik, what do you think?

@rileykarson rileykarson requested review from trodge and removed request for roaks3 August 7, 2023 20:23
@rileykarson
Copy link
Member

Rerolling reviewer as the original was OOO

@trodge
Copy link
Contributor

trodge commented Aug 9, 2023

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Aug 9, 2023
@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.

Terraform GA: Diff ( 4 files changed, 160 insertions(+))
Terraform Beta: Diff ( 4 files changed, 160 insertions(+))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    windows_node_config {
      osversion = # value needed
    }
  }
  node_pool {
    node_config {
      windows_node_config {
        osversion = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2940
Passed tests 2594
Skipped tests: 302
Affected tests: 44

Action taken

Found 44 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerNodePool_gvnic|TestAccContainerNodePool_gcfsConfig|TestAccContainerNodePool_localNvmeSsdBlockConfig|TestAccContainerNodePool_ephemeralStorageLocalSsdConfig|TestAccContainerNodePool_ephemeralStorageConfig|TestAccContainerNodePool_withSoleTenantConfig|TestAccContainerNodePool_shieldedInstanceConfig|TestAccContainerNodePool_EmptyGuestAccelerator|TestAccContainerNodePool_012_ConfigModeAttr|TestAccContainerCluster_withNodePoolNodeConfig|TestAccContainerCluster_withILBSubsetting|TestAccContainerCluster_backend|TestAccContainerNodePool_withManagement|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withBootDiskKmsKey|TestAccContainerNodePool_withGPU|TestAccContainerCluster_withWorkloadMetadataConfig|TestAccContainerCluster_withSandboxConfig|TestAccContainerCluster_withNodeConfigReservationAffinity|TestAccContainerCluster_withNodeConfigReservationAffinitySpecific|TestAccContainerCluster_withNodeConfigShieldedInstanceConfig|TestAccContainerCluster_withNodeConfigScopeAlias|TestAccContainerCluster_withLoggingVariantInNodePool|TestAccContainerCluster_withLoggingVariantInNodeConfig|TestAccContainerCluster_withNodeConfig|TestAccContainerNodePool_withNodeConfigScopeAlias|TestAccContainerNodePool_withEnablePrivateNodesToggle|TestAccContainerNodePool_withMultiNicNetworkConfig|TestAccContainerNodePool_withWindowsNodeConfig|TestAccContainerNodePool_withLinuxNodeConfig|TestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withSandboxConfig|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccContainerNodePool_withReservationAffinitySpecific|TestAccContainerNodePool_withReservationAffinity|TestAccContainerNodePool_withNodeConfig|TestAccContainerNodePool_withLoggingVariantUpdates|TestAccContainerCluster_customPlacementPolicy|TestAccContainerNodePool_withHostMaintenancePolicy|TestAccContainerNodePool_threadsPerCore|TestAccContainerNodePool_compactPlacement|TestAccContainerCluster_withSoleTenantGroup|TestAccContainerNodePool_withNetworkConfig|TestAccContainerNodePool_customPlacementPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerNodePool_gvnic[Error message] [Debug log]
TestAccContainerNodePool_gcfsConfig[Error message] [Debug log]
TestAccContainerNodePool_localNvmeSsdBlockConfig[Error message] [Debug log]
TestAccContainerNodePool_ephemeralStorageLocalSsdConfig[Error message] [Debug log]
TestAccContainerNodePool_ephemeralStorageConfig[Error message] [Debug log]
TestAccContainerNodePool_withSoleTenantConfig[Error message] [Debug log]
TestAccContainerNodePool_shieldedInstanceConfig[Error message] [Debug log]
TestAccContainerNodePool_EmptyGuestAccelerator[Error message] [Debug log]
TestAccContainerNodePool_012_ConfigModeAttr[Error message] [Debug log]
TestAccContainerCluster_withNodePoolNodeConfig[Error message] [Debug log]
TestAccContainerCluster_withILBSubsetting[Error message] [Debug log]
TestAccContainerCluster_backend[Error message] [Debug log]
TestAccContainerNodePool_withManagement[Error message] [Debug log]
TestAccContainerCluster_withConfidentialNodes[Error message] [Debug log]
TestAccContainerCluster_withBootDiskKmsKey[Error message] [Debug log]
TestAccContainerNodePool_withGPU[Error message] [Debug log]
TestAccContainerCluster_withWorkloadMetadataConfig[Error message] [Debug log]
TestAccContainerCluster_withSandboxConfig[Error message] [Debug log]
TestAccContainerCluster_withNodeConfigReservationAffinity[Error message] [Debug log]
TestAccContainerCluster_withNodeConfigReservationAffinitySpecific[Error message] [Debug log]
TestAccContainerCluster_withNodeConfigShieldedInstanceConfig[Error message] [Debug log]
TestAccContainerCluster_withNodeConfigScopeAlias[Error message] [Debug log]
TestAccContainerCluster_withLoggingVariantInNodePool[Error message] [Debug log]
TestAccContainerCluster_withLoggingVariantInNodeConfig[Error message] [Debug log]
TestAccContainerCluster_withNodeConfig[Error message] [Debug log]
TestAccContainerNodePool_withNodeConfigScopeAlias[Error message] [Debug log]
TestAccContainerNodePool_withEnablePrivateNodesToggle[Error message] [Debug log]
TestAccContainerNodePool_withMultiNicNetworkConfig[Error message] [Debug log]
TestAccContainerNodePool_withLinuxNodeConfig[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerNodePool_withSandboxConfig[Error message] [Debug log]
TestAccContainerNodePool_withWorkloadIdentityConfig[Error message] [Debug log]
TestAccContainerNodePool_withReservationAffinitySpecific[Error message] [Debug log]
TestAccContainerNodePool_withReservationAffinity[Error message] [Debug log]
TestAccContainerNodePool_withNodeConfig[Error message] [Debug log]
TestAccContainerNodePool_withLoggingVariantUpdates[Error message] [Debug log]
TestAccContainerCluster_customPlacementPolicy[Error message] [Debug log]
TestAccContainerNodePool_withHostMaintenancePolicy[Error message] [Debug log]
TestAccContainerNodePool_threadsPerCore[Error message] [Debug log]
TestAccContainerNodePool_compactPlacement[Error message] [Debug log]
TestAccContainerCluster_withSoleTenantGroup[Error message] [Debug log]
TestAccContainerNodePool_withNetworkConfig[Error message] [Debug log]
TestAccContainerNodePool_customPlacementPolicy[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@quoctruong
Copy link
Contributor

@pranavparuchuri I am looking for something similar to add support for windows_node_config on GKE. Is there any reason why you close the PR?

@quoctruong
Copy link
Contributor

I created #13197 based on this PR. @trodge Can you help me TAL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants