What problem does it solve?
It standardizes and accelerates the creation of KRM types and CRD scaffolding for new Config Connector "direct" resources, reducing inconsistencies across generated Go types and CRD outputs.
Core Features & Use Cases
- Generate initial KRM types for new direct resources: Produces the
_types.go and generation plumbing for a new Kind by mapping it to the appropriate proto definitions.
- Enforce CRD labeling and struct correctness: Ensures required
+kubebuilder:metadata:labels are present exactly as specified and that status includes status.observedGeneration as an *int64.
- Guarantee proto-to-KRM mapping: Verifies
+kcc:proto tags on Spec and ObservedState so reconcilers and CRD generation align with GCP API semantics.
- Register the Kind and regenerate CRDs: Ensures the new Kind is wired into
register.go and that running dev/tasks/generate-crds yields the expected YAML in config/crds/resources/.
Quick Start
Implement a new direct resource by updating the versioned apis/<service>/v1alpha1/generate.sh, generating the _types.go for your Kind and proto message, registering the Kind in apis/<service>/v1alpha1/register.go, and then running dev/tasks/generate-crds to confirm the CRD YAML appears in config/crds/resources/.