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 support for PrivateRegistryAccessConfig #10591

Merged
merged 5 commits into from
May 16, 2024

Conversation

vivzbansal
Copy link
Contributor

@vivzbansal vivzbansal commented May 3, 2024

This PR adds support for PrivateRegistryAccessConfig. See the public docs:

Release Note Template for Downstream PRs (will be copied)

container: added `containerd_config` field and subfields to `google_container_cluster` and `google_container_node_pool` resources, to allow those resources to access private image registries.

PS: This PR is the clone of the work authored by @mmiranda96 in this PR: #10450. Thanks Mike!

@vivzbansal vivzbansal marked this pull request as ready for review May 3, 2024 17:27
@github-actions github-actions bot requested a review from SarahFrench May 3, 2024 17:27
Copy link

github-actions bot commented May 3, 2024

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

@SarahFrench, 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 awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/container and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels May 3, 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, 483 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 484 insertions(+), 2 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    containerd_config {
      private_registry_access_config {
        certificate_authority_domain_config {
          fqdns = # value needed
          gcp_secret_manager_certificate_config {
            secret_uri = # value needed
          }
        }
        enabled = # value needed
      }
    }
  }
  node_pool {
    node_config {
      containerd_config {
        private_registry_access_config {
          certificate_authority_domain_config {
            fqdns = # value needed
            gcp_secret_manager_certificate_config {
              secret_uri = # value needed
            }
          }
          enabled = # value needed
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 194
Passed tests: 182
Skipped tests: 10
Affected tests: 2

Click here to see the affected service packages
  • container

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
TestAccContainerCluster_privateRegistry|TestAccContainerNodePool_privateRegistry

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerCluster_privateRegistry[Debug log]
TestAccContainerNodePool_privateRegistry[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
Collaborator

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your PR!

Could you please add additional tests that cover the fields mentioned in this message? Your new tests cover fields nested under node_pool_defaults but that message indicates they can also be set under node_config and node_pool top level fields too.

Also, do you have any API documentation you could share about these new API fields? Thanks!

@github-actions github-actions bot requested a review from SarahFrench May 10, 2024 06:33
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 10, 2024
@vivzbansal
Copy link
Contributor Author

Hi, thanks for your PR!

Could you please add additional tests that cover the fields mentioned in this message? Your new tests cover fields nested under node_pool_defaults but that message indicates they can also be set under node_config and node_pool top level fields too.

Also, do you have any API documentation you could share about these new API fields? Thanks!

Added acceptance tests.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 10, 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, 594 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 595 insertions(+), 2 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    containerd_config {
      private_registry_access_config {
        certificate_authority_domain_config {
          fqdns = # value needed
          gcp_secret_manager_certificate_config {
            secret_uri = # value needed
          }
        }
        enabled = # value needed
      }
    }
  }
  node_pool {
    node_config {
      containerd_config {
        private_registry_access_config {
          certificate_authority_domain_config {
            fqdns = # value needed
            gcp_secret_manager_certificate_config {
              secret_uri = # value needed
            }
          }
          enabled = # value needed
        }
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 195
Passed tests: 185
Skipped tests: 10
Affected tests: 0

Click here to see the affected service packages
  • container
$\textcolor{green}{\textsf{All tests passed!}}$ View the [build log](https://storage.cloud.google.com/ci-vcr-logs/beta/refs/heads/auto-pr-10591/artifacts/e18d255d-e027-4342-928a-45bf88d610ef/build-log/replaying_test.log)

Copy link
Collaborator

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

As well as our thread on provisioning the secret that's referenced in the acceptance tests, please follow the guidance in this automated message: #10591 (comment)

@github-actions github-actions bot requested a review from SarahFrench May 15, 2024 00:15
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 15, 2024
@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 15, 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, 583 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 584 insertions(+), 2 deletions(-))

Missing test report

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

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

resource "google_container_cluster" "primary" {
  node_config {
    containerd_config {
      private_registry_access_config {
        certificate_authority_domain_config {
          fqdns = # value needed
          gcp_secret_manager_certificate_config {
            secret_uri = # value needed
          }
        }
        enabled = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 195
Passed tests: 183
Skipped tests: 10
Affected tests: 2

Click here to see the affected service packages
  • container

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
TestAccContainerCluster_privateRegistry|TestAccContainerNodePool_privateRegistry

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerCluster_privateRegistry[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

Copy link
Collaborator

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

Left some comments about the config for the added secrets - we need to make sure the names are unique, which is done by passing in a random string to the config. Here's an example:

@github-actions github-actions bot requested a review from SarahFrench May 15, 2024 22:23
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 15, 2024
@vivzbansal
Copy link
Contributor Author

Left some comments about the config for the added secrets - we need to make sure the names are unique, which is done by passing in a random string to the config. Here's an example:

Thanks for the detailed review of this PR. Added random string to the secret name/ID.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 16, 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, 650 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 651 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 195
Passed tests: 183
Skipped tests: 10
Affected tests: 2

Click here to see the affected service packages
  • container

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
TestAccContainerCluster_privateRegistry|TestAccContainerNodePool_privateRegistry

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerCluster_privateRegistry[Debug log]
TestAccContainerNodePool_privateRegistry[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

@SarahFrench
Copy link
Collaborator

Thanks for making the changes I asked, merging now 🚀

@SarahFrench SarahFrench merged commit c843c6b into GoogleCloudPlatform:main May 16, 2024
13 checks passed
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
avijain25 pushed a commit to avijain25/magic-modules that referenced this pull request May 21, 2024
ma-g-22 pushed a commit to ma-g-22/magic-modules that referenced this pull request May 21, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
pcostell pushed a commit to pcostell/magic-modules that referenced this pull request Jul 16, 2024
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.

4 participants