kcc-direct-resource-scaffolder

Scaffold KCC direct resources with standardized CRD generation and validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating a new KCC direct resource can be error-prone and inconsistent across services, especially when CRD generation, kubebuilder validation tags, and reconciliation expectations must match project standards.

Core Features & Use Cases

  • Automated scaffold setup: Ensures the correct generate.sh entry exists under the expected apis/<service_short>/<api_version>/ path for direct resource development.
  • Deterministic type generation: Runs the repo tooling to generate CRD types and related artifacts from the specified Google API service and KCC resource mapping.
  • Validation-focused hardening: Guides you to verify standard copyright text, CRD labels, kubebuilder validation tags, enum typing strategy, and status.observedGeneration typing.
  • Use case: Kick off a new “direct” implementation for a GCP resource when you need CRDs and code generation to align with validation and reconciliation patterns used across the project.

Quick Start

Use this skill to scaffold a new direct resource for the Google API service you are implementing by providing the service name, the KCC Kind-to-GCP resource mapping, and (optionally) the KCC API version.

Frequently Asked Questions about kcc-direct-resource-scaffolder

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

FAQPage Schema
How do I scaffold a new KCC direct resource for a GCP API service?

Scaffolding a KCC direct resource requires providing the GCP service name and KCC Kind-to-resource mapping. The skill automates setting up the generate.sh entry under apis/<service_short>/<api_version>/ and generates the required CRD Go types.

Why does my Config Connector CRD generation lack consistent kubebuilder validation tags?

Inconsistent CRD generation often occurs when standards are applied manually. This skill enforces required kubebuilder validation tags, standard CRD labels, and correct enum Go typing rules during the initial scaffolding to ensure consistency.

What is the correct apis path for generating KCC direct resource CRDs?

The correct path for KCC direct resource CRD generation is apis/<service_short>/<api_version>/. The skill verifies that generation.sh exists in this exact location to ensure repo tooling can generate the required types.

Do I need to manually set status.observedGeneration as *int64 for direct resource reconciliation?

No, manual typing is unnecessary. The scaffolding process automatically enforces status.observedGeneration as *int64, along with required copyright text and enum typing strategies, to align with project reconciliation expectations.

Can I use this scaffolding for existing KCC resources that need CRD validation updates?

No, this skill applies specifically to new direct implementations. It is designed to kick off initial scaffolding where Go types, CRD fields, and status typing must be standardized from the start.

What's the best way to standardize enum Go typing rules when creating Config Connector resources?

The best way to standardize enum typing is through automated scaffolding. The skill guides you to verify enum Go typing strategy and kubebuilder validation tags during the initial CRD generation for your GCP resource.