Skip to content

Migrate ComputeURLMap to Direct controller - generate type#6854

Open
codebot-robot wants to merge 2 commits intoGoogleCloudPlatform:masterfrom
codebot-robot:issue_6438_v2
Open

Migrate ComputeURLMap to Direct controller - generate type#6854
codebot-robot wants to merge 2 commits intoGoogleCloudPlatform:masterfrom
codebot-robot:issue_6438_v2

Conversation

@codebot-robot
Copy link
Collaborator

Migrate the ComputeURLMap resource to use the Direct controller architecture.

This PR adds the generated types, identity, and reference for ComputeURLMap in the compute v1beta1 API. It also updates the generate.sh script and generates the initial mappers.

Key changes:

  • Updated apis/compute/v1beta1/generate.sh to include ComputeURLMap.
  • Created apis/compute/v1beta1/urlmap_identity.go to support both Global and Regional URL Maps.
  • Created apis/compute/v1beta1/urlmap_reference.go.
  • Populated apis/compute/v1beta1/urlmap_types.go with fields mapped from the proto.
  • Generated mappers in pkg/controller/direct/compute/mapper.generated.go.

Fixes #6438

This PR was generated by the gemini-3-flash-preview model.

This commit adds the generated types, identity, and reference for ComputeURLMap in the compute v1beta1 API, and updates the generate.sh script and mappers. Fixes GoogleCloudPlatform#6438
@google-oss-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cheftako for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codebot-robot
Copy link
Collaborator Author

I have addressed the validation failures by registering the new ComputeURLMap resource as a direct controller while keeping Terraform as the default reconciler. This follows the standard KCC migration pattern, ensuring no breakage for existing users while enabling the new generated types and supporting opt-in testing for the direct controller.

Key changes:

  • Created a skeleton direct controller in .
  • Added the and methods to .
  • Added the exported function to .
  • Added the label to the Go struct to ensure it remains Terraform-managed by default.
  • Regenerated all supporting files (, , CRDs, and resource reports) to be consistent with the changes.

@codebot-robot
Copy link
Collaborator Author

I have addressed the validation failures by registering the new ComputeURLMap resource as a direct controller while keeping Terraform as the default reconciler. This follows the standard KCC migration pattern, ensuring no breakage for existing users while enabling the new generated types and supporting opt-in testing for the direct controller.

Key changes:

  • Created a skeleton direct controller in pkg/controller/direct/compute/urlmap_controller.go.
  • Added the NewUrlMapsClient and NewRegionalUrlMapsClient methods to pkg/controller/direct/compute/client.go.
  • Added the NewComputeURLMapIdentity exported function to apis/compute/v1beta1/urlmap_identity.go.
  • Added the tf2crd: "true" label to the ComputeURLMap Go struct to ensure it remains Terraform-managed by default.
  • Regenerated all supporting files (static_config.go, gvks_generated.go, CRDs, and resource reports) to be consistent with the changes.

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.

Migrate ComputeURLMap to Direct controller - generate type

1 participant