reviewgen-greenfield-new-types

Reviews pull requests adding new KCC types for Greenfield GCP resources against defined criteria.

1.1k|377|Updated Apr 8, 2019
One-click install
npx skills add https://github.com/GoogleCloudPlatform/k8s-config-connector --skill reviewgen-greenfield-new-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reviewgen-greenfield-new-types
Source: https://github.com/GoogleCloudPlatform/k8s-config-connector/tree/main/.gemini/skills/reviewgen-greenfield-new-types
Command: npx skills add https://github.com/GoogleCloudPlatform/k8s-config-connector --skill reviewgen-greenfield-new-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing pull requests that add new Kubernetes Config Connector (KCC) types for Greenfield GCP resources requires checking many conventions manually, including API versioning, Go pointer rules, proto-to-CRD field completeness, and reference patterns, which is error-prone and inconsistent.

Core Features & Use Cases

  • API Version Validation: Verifies Greenfield resources are implemented as v1alpha1 in KRM and placed under apis/${resource_group}/v1alpha1/.
  • Go Type Pointer Checks: Enforces that scalar primitive fields are pointers while slices and maps are not.
  • Proto-to-CRD Completeness: Compares generated CRD YAML against Google API proto definitions to confirm 100% field coverage and correct spec/status mapping.
  • Use Case: When a contributor opens a PR adding a new Greenfield resource type, run this review to produce a structured pass/fail report covering versioning, pointers, references, and completeness.

Quick Start

Review this pull request that adds a new KCC Greenfield resource type and report findings using the standard review template.

Frequently Asked Questions about reviewgen-greenfield-new-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a PR that adds a new KCC Greenfield resource type?

Check API versioning (v1alpha1 in KRM), copyright headers, Go pointer rules for scalar fields, reference struct usage, and proto-to-CRD field completeness. The review output follows a structured template with pass/fail results per criterion.

What API version must Greenfield KCC resources use?

All Greenfield resources must be implemented as v1alpha1 in the Kubernetes Resource Model, with files placed under apis/${resource_group}/v1alpha1/. The GCP API version can be higher, but the KRM version must remain v1alpha1.

When should Go fields be pointers in KCC type definitions?

Scalar primitive fields such as string, bool, int, int32, int64, and float64 must always be pointers regardless of whether they are optional or required. Slice and map fields must not be pointers.

How is proto-to-CRD field completeness verified for Greenfield resources?

Compare the generated CRD YAML against the proto definition found under .build/third_party/googleapis matching the service in generate.sh. OUTPUT_ONLY fields map to status, and all other fields map to spec, targeting 100% coverage.

Can new reference files be added under apis/refs/v1beta1?

No, the apis/refs/v1beta1/ directory is deprecated. No new reference files or KindRef implementations may be added there, and Greenfield resources must use refs.Normalize instead of refs.NormalizeWithFallback.