Skip to content

Greenfield: Implement direct KRM types, identity, and generate.sh for SaaSServiceMgmtRolloutKind - #13622

Open
hopper-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
hopper-coder-bot:issue-13601-1790893876
Open

hopper-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
hopper-coder-bot:issue-13601-1790893876

Conversation

@hopper-coder-bot

Copy link
Copy Markdown
Collaborator

Description

This PR implements direct KRM types, identity, reference, and generate.sh for the SaaSServiceMgmtRolloutKind greenfield resource (saasservicemgmt.cnrm.cloud.google.com/v1alpha1).

Key Changes

  1. Types & References:
    • Added KRM types for SaaSServiceMgmtRolloutKindSpec and SaaSServiceMgmtRolloutKindObservedState in apis/saasservicemgmt/v1alpha1/saasservicemgmtrolloutkind_types.go.
    • Verified that all primitive fields are pointers (*string, *int32, *int64) adhering to KCC guidelines.
    • Configured kubebuilder validations for immutable fields (location, unitKind) and enum validation for updateUnitKindStrategy.
  2. Identity & Reference:
    • Implemented SaaSServiceMgmtRolloutKindIdentity matching the CAIS URL template projects/{project}/locations/{location}/rolloutKinds/{rolloutkind} in apis/saasservicemgmt/v1alpha1/saasservicemgmtrolloutkind_identity.go.
    • Implemented SaaSServiceMgmtRolloutKindRef in apis/saasservicemgmt/v1alpha1/saasservicemgmtrolloutkind_reference.go.
    • Added unit tests in apis/saasservicemgmt/v1alpha1/saasservicemgmtrolloutkind_identity_test.go.
  3. Scaffolding & Mapper:
    • Added --resource SaaSServiceMgmtRolloutKind:RolloutKind to apis/saasservicemgmt/generate.sh.
    • Added custom mapping helpers in pkg/controller/direct/saasservicemgmt/mapper.go for proto3 optional fields in ErrorBudget.
    • Generated CRDs, deepcopy functions, and proto-to-KRM mappers.
    • Updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt.

Fixes #13601

NONE

This PR was generated by the overseer,step/gen-types,greenfield,overseer/review agent (powered by the gemini-3.7-flash model).

…h for SaaSServiceMgmtRolloutKind

Implement KRM types, identity, reference, and generate.sh mapping for Greenfield resource SaaSServiceMgmtRolloutKind.

Issue: 13601
@hopper-coder-bot hopper-coder-bot added overseer step/gen-types greenfield Indicates implementation of a new resource (vs migration) overseer/review labels Oct 2, 2026
@google-oss-prow

Copy link
Copy Markdown
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 ldanielmadariaga 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

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started reviewing this pull request in a sandbox.

1 similar comment
@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started reviewing this pull request in a sandbox.

@reviewbot-robot reviewbot-robot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

KCC Auto-Review Results

  • Trigger criteria matched: Yes
  • API Version Check: Pass - Checked apis/saasservicemgmt/v1alpha1/ and CRD version v1alpha1.
  • Go Type Pointers: Pass - All scalar primitive types in SaaSServiceMgmtRolloutKindSpec, ErrorBudget, and SaaSServiceMgmtRolloutKindObservedState (including Location) are declared as pointers. Slice and map fields are non-pointers.
  • Completeness & Heuristics: Pass - 100% coverage of fields from google.cloud.saasplatform.saasservicemgmt.v1beta1.RolloutKind. Output-only fields (uid, etag, create_time, update_time) are correctly mapped to ObservedState, and mutable/configurable fields are mapped to Spec.
  • 1:1 Kind to Proto Mapping: Pass - SaaSServiceMgmtRolloutKind maps 1:1 to google.cloud.saasplatform.saasservicemgmt.v1beta1.RolloutKind.
  • References/Identity: Pass - Resource identity matches canonical CAIS URI format projects/{project}/locations/{location}/rolloutKinds/{rolloutkind}. Identity parsing and normalization adhere to IdentityV2 and refs.Ref standards using refs.Normalize.
  • Exception Files: Pass - Only tests/apichecks/testdata/exceptions/alpha-missingfields.txt was modified.

Detailed Findings / Actions Required:

None. All checks pass and code complies with Greenfield KRM type standards.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started addressing review feedback for this pull request.

@hopper-coder-bot

Copy link
Copy Markdown
Collaborator Author

Thank you for the review. All automated checks passed with no action required.

(This comment was generated by overseer)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

greenfield Indicates implementation of a new resource (vs migration) overseer/ready-for-human overseer step/gen-types

3 participants