magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Add support for PrivateRegistryAccessConfig

Open mmiranda96 opened this issue 10 months ago • 8 comments

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

  • https://cloud.google.com/kubernetes-engine/docs/how-to/access-private-registries-private-certificates
  • https://cloud.google.com/kubernetes-engine/docs/how-to/customize-containerd-configuration

Release Note Template for Downstream PRs (will be copied)

container: added `containerd_config`, `private_registry_access_config`, `certificate_authority_domain_config`, and  `gcp_secret_manager_certificate_config` fields to `google_container_node_config`

mmiranda96 avatar Apr 15 '24 17:04 mmiranda96

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.

github-actions[bot] avatar Apr 15 '24 17:04 github-actions[bot]

PR is pending of a new version of https://github.com/googleapis/google-api-go-client being cut that includes https://github.com/googleapis/google-api-go-client/pull/2516. Once this is available I will update go.mod and fix dependencies.

mmiranda96 avatar Apr 15 '24 18:04 mmiranda96

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(-))

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 avatar Apr 16 '24 15:04 modular-magician

New googleapis/google-api-go-client version has been cut and upgraded to in this PR, it's ready for review

mmiranda96 avatar Apr 17 '24 17:04 mmiranda96

New googleapis/google-api-go-client version has been cut and upgraded to in this PR, it's ready for review

Thanks for the update. I just triggered the tests. Plus, you can follow the steps at go/terraform-contribution-guide#before-you-begin to join the org membership to get the tests automatically run for your PRs

shuyama1 avatar Apr 17 '24 20:04 shuyama1

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 ( 7 files changed, 486 insertions(+), 4 deletions(-)) google-beta provider: Diff ( 7 files changed, 487 insertions(+), 5 deletions(-))

Missing test report

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

Resource: google_container_cluster (352 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 = # value needed
    containerd_config {
      private_registry_access_config = # value needed
      private_registry_access_config {
        certificate_authority_domain_config = # value needed
        certificate_authority_domain_config {
          fqdns                                 = # value needed
          gcp_secret_manager_certificate_config = # value needed
          gcp_secret_manager_certificate_config {
            secret_uri = # value needed
          }
        }
        enabled = # value needed
      }
    }
  }
  node_pool {
    node_config {
      containerd_config = # value needed
      containerd_config {
        private_registry_access_config = # value needed
        private_registry_access_config {
          certificate_authority_domain_config = # value needed
          certificate_authority_domain_config {
            fqdns                                 = # value needed
            gcp_secret_manager_certificate_config = # value needed
            gcp_secret_manager_certificate_config {
              secret_uri = # value needed
            }
          }
          enabled = # value needed
        }
      }
    }
  }
  node_pool_defaults {
    node_config_defaults {
      containerd_config = # value needed
      containerd_config {
        private_registry_access_config = # value needed
        private_registry_access_config {
          certificate_authority_domain_config = # value needed
          certificate_authority_domain_config {
            gcp_secret_manager_certificate_config = # value needed
          }
        }
      }
    }
  }
}

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

resource "google_container_node_pool" "primary" {
  node_config {
    containerd_config = # value needed
    containerd_config {
      private_registry_access_config = # value needed
      private_registry_access_config {
        certificate_authority_domain_config = # value needed
        certificate_authority_domain_config {
          gcp_secret_manager_certificate_config = # value needed
        }
      }
    }
  }
}

modular-magician avatar Apr 17 '24 20:04 modular-magician

Unit tests failed with error

go: updates to go.mod needed; to update it:
	go mod tidy
make: *** [Makefile:10: test] Error 1

you may need to run go mod tidy against the generated local provider and copy the change in go.mod and go.sum back to the files in Magic Modules.

shuyama1 avatar Apr 18 '24 17:04 shuyama1

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 ( 7 files changed, 488 insertions(+), 6 deletions(-)) google-beta provider: Diff ( 7 files changed, 489 insertions(+), 7 deletions(-))

Missing test report

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

Resource: google_container_cluster (352 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 avatar Apr 18 '24 23:04 modular-magician

@vivzbansal will take ownership of this work. Thanks Vivek!

mmiranda96 avatar May 02 '24 19:05 mmiranda96