What problem does it solve?
When developing new direct resources for Google Cloud Config Connector, generated _types.go files often miss mandatory conventions such as CRD labels, reference field patterns, and proto annotations, leading to failed API checks and inconsistent CRDs. This Skill defines the shared baseline standards that every new KRM type must satisfy, for both greenfield and brownfield resources.
Core Features & Use Cases
- Type Definition Standards: Enforces copyright headers, kubebuilder CRD labels,
observedGeneration typing, acronym capitalization, and correct placement of service-generated fields under status.observedState.
- Reference Field Implementation: Guides creation of
<kind>_reference.go and <kind>_identity.go files for external-only references, including Ref interface methods and identity parsing with gcpurls templates.
- Proto Annotation Mapping: Specifies the
+kcc:spec:proto, +kcc:observedstate:proto, and +kcc:proto annotations required for automatic mapper generation.
- Use Case: After running the type generator for a new GCP service like Network Security, use this Skill to verify the generated
_types.go, move manual structs out of types.generated.go, and add an external-only reference for a dependent resource.
Quick Start
Review the generated _types.go file for my new Config Connector direct resource and fix it to comply with the KCC baseline standards.