crd-development

Create Kubernetes CRDs and controllers for the Cloudflare Operator.

6|4|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/StringKe/cloudflare-operator --skill crd-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crd-development
Source: https://github.com/StringKe/cloudflare-operator/tree/main/.claude/skills/crd-development
Command: npx skills add https://github.com/StringKe/cloudflare-operator --skill crd-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CRD development enables creating new Kubernetes CustomResourceDefinitions, wiring controllers, and integrating Cloudflare APIs within the Cloudflare Operator. This skill streamlines adding new CRD types and controller logic to support evolving Cloudflare features.

Core Features & Use Cases

  • Define API types in api/v1alpha2 and implement controllers to manage the lifecycle of new resources.
  • Integrate with internal/clients/cf to talk to Cloudflare APIs and implement operator behavior.
  • Use case: add a new CRD to manage a Cloudflare resource such as a tunnel, policy, or rule, with a matching controller.

Quick Start

Scaffold a new CRD resource type, implement its controller, and connect Cloudflare API calls in the reconcile loop.

Frequently Asked Questions about crd-development

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

FAQPage Schema
How do I create a new Kubernetes CRD for the Cloudflare Operator?

To create a new Kubernetes CRD, you define API types in api/v1alpha2, scaffold a matching controller in internal/controller, and wire Cloudflare API calls within the reconcile loop.

What is the correct project layout for adding a CustomResourceDefinition using kubebuilder?

The correct kubebuilder project layout for a CustomResourceDefinition places API type definitions in api/v1alpha2, controller logic in internal/controller, and API clients in internal/clients/cf.

How does controller reconciliation work when integrating Cloudflare APIs in a Kubernetes operator?

Controller reconciliation integrates Cloudflare APIs by executing internal/clients/cf calls inside the reconcile loop, managing the lifecycle of new custom resources continuously against the Cloudflare API state.

Can I use this approach to manage Cloudflare resources like tunnels or rules as native Kubernetes objects?

Yes, you can manage Cloudflare resources like tunnels or rules by defining a new CRD type and implementing its controller to handle the resource lifecycle and API integration natively within Kubernetes.

Do I need kubebuilder to extend existing CRDs with new controllers for Cloudflare features?

Yes, kubebuilder is required to enforce API type definitions and scaffold controllers correctly, ensuring structured project layout when extending existing CRDs for new Cloudflare features.