Review Kubernetes operators against official API conventions for CRD design, controller implementation, and architecture patterns
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Review Kubernetes operators against official API conventions for CRD design, controller implementation, and architecture patterns
What I do
I perform a comprehensive design review of Kubernetes operators against the official API Conventions. I check CRD definitions, controller implementations, and architecture patterns across 10 review areas: API structure, field design, validation, status conventions, references, behavioral conventions, advanced patterns, performance, security/RBAC, and observability. Each item is rated PASS, WARNING, or FAIL with actionable findings.
When to use me
Before submitting a new Kubernetes operator or CRD for review
When designing or iterating on custom resource APIs
To audit an existing operator for compliance with upstream conventions
After significant changes to CRD schemas or controller reconciliation logic
When preparing an operator for promotion from alpha to beta or GA
State derived from spec+status, not stored separately
State transitions are clear and documented
No race conditions between state transitions
Error/degraded states handled gracefully
Terminal states (success/failure) reached appropriately
4. API Efficiency:
Uses cached informers, not direct API queries in hot path
Minimizes API calls per reconcile
Status updates only on actual changes
No periodic heartbeat updates
Batch operations when possible
RequeueAfter for polling instead of tight loops
5. Error Handling:
Transient errors return error to requeue
Permanent errors set Degraded/Failed condition
Error messages actionable and specific
Retry logic has backoff
Errors don't block other resources
6. Concurrency:
Uses resourceVersion for optimistic concurrency
Handles update conflicts gracefully (refetch and retry)
No distributed locks for single-resource operations
Thread-safe access to shared state
MaxConcurrentReconciles set appropriately
Output Format
For each review section, provide a structured report:
### [Section Name] - [CRD/Controller Name]**Status**: PASS | WARNING | FAIL
**Findings**:
- PASS: Field naming follows camelCase convention
- WARNING: Missing observedGeneration in status
- FAIL: Status fields used as input to reconciliation logic
**Required Actions** (if FAIL):
1. Add `observedGeneration` field to status subresource
2. Remove controller logic that reads status.processedCount as input
3. Move processedCount calculation to be derived from spec
**Recommendations** (if WARNING):
1. Consider adding short names for CLI convenience
2. Add validation webhook for cross-field constraints
Example Output:
### API Resource Structure - Database CRD**Status**: WARNING
**Findings**:
- PASS: TypeMeta and ObjectMeta properly defined
- PASS: Clear spec/status separation
- WARNING: Missing observedGeneration field in status
- PASS: Owner references set correctly
**Required Actions**: None (warnings only)
**Recommendations**:
1. Add observedGeneration to track spec-status synchronization
2. Document spec/status separation in API comments