with one click
crd-mcp-server
// Provides instructions and a tool for analyzing Custom Resource Definition (CRD) changes, including checking for KRM API structural equivalence and backward compatibility.
// Provides instructions and a tool for analyzing Custom Resource Definition (CRD) changes, including checking for KRM API structural equivalence and backward compatibility.
Moves a mockgcp service from using locally generated grpc-gateway proto bindings to using reflection with the official Google Cloud Go client library (httptogrpc). Use this when tasked with stopping grpc-gateway generation for a GCP service in mockgcp.
Creates or updates the _identity.go and _reference.go files for a Config Connector resource, ensuring they follow the canonical gcpurls.Template pattern. Use this when you need to make sure the identity and reference is up to date for a KCC resource or when implementing IdentityV2 and refs.Ref for a resource.
Implement the controller, mappers, and fuzzer for a direct KCC resource, ensuring package isolation and CI compliance. Use this when implementing the main reconciliation logic for a "direct" resource.
Guides the implementation of KRM types and CRD scaffolding for new "direct" resources.
Checks apis/ subdirectories for missing generate.sh and helps create PRs to add them, following the pattern in
Provides a structured logic for capturing and routing agentic learnings to prevent knowledge pollution.
| name | crd-mcp-server |
| description | Provides instructions and a tool for analyzing Custom Resource Definition (CRD) changes, including checking for KRM API structural equivalence and backward compatibility. |
The crd-mcp-server is a binary tool under dev/tools/crd-mcp-server/ designed to check and validate Custom Resource Definition (CRD) schema changes in the Config Connector repository. It has two main subcommands:
equivalent: Checks whether a CRD change is equivalent to its previous git-committed version (no fields added or removed under spec, no type or CEL validation changes, etc.).compatible: Checks whether a CRD change is backward compatible with its previous git-committed version (no fields removed or renamed, no incompatible type changes, allowed additions).This tool is used in presubmits (e.g., dev/ci/presubmits/crd-equivalence-check) to ensure that KRM schemas remain compatible or equivalent during migration from legacy to direct reconcilers.
Before running, ensure you run from the repository root. You can build and run the tool directly using go run:
To check if a changed CRD is equivalent to its version on master:
go run ./dev/tools/crd-mcp-server equivalent --file config/crds/resources/services/v1beta1/service_kind.yaml --ref master
To check if a changed CRD is backward-compatible with master:
go run ./dev/tools/crd-mcp-server compatible --file config/crds/resources/services/v1beta1/service_kind.yaml --ref master