k8s-api-review
Review Kubernetes operators against official API conventions for CRD design, controller implementation, and architecture patterns
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review Kubernetes operators against official API conventions for CRD design, controller implementation, and architecture patterns
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | k8s-api-review |
| description | Review Kubernetes operators against official API conventions for CRD design, controller implementation, and architecture patterns |
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.
Review the operator design and implementation against Kubernetes API conventions from https://github.com/kubernetes/community/blob/main/contributors/devel/sig-architecture/api-conventions.md
Step 1: Identify the operator components to review:
+kubebuilder markers)Step 2: For each CRD, apply the "CRD-Specific Review Template"
Step 3: For each controller, apply the "Controller Review Template"
Step 4: Apply all general checklist items (sections 1-10)
Step 5: Generate the review report using the output format below
For each review area below, check the implementation against the criteria and report:
apiVersion and kind fieldsmetadata sectionname, namespace (if namespaced), labels, annotationsownerReferences for garbage collection (BootcNode -> BootcNodePool)spec (desired state) and status (observed state)Database, Backup, Certificate)databases, backups, certificates)example.com, apps.mycompany.io)v1alpha1, v1beta1, v1)paused not notPaused)Time or include time units (e.g., timeoutSeconds)maxUnavailable, timeoutSeconds)Ref (e.g., pullSecretRef)int32 or int64 for integers (not int)string for textmetav1.Time for timestamps (not string)resource.Quantity for storage/memory quantitiesintstr.IntOrString for fields accepting both int and percentagestring type with clear valid values documented+optionalconditions array of type []metav1.Conditiontype, status, reason, message, lastTransitionTime, observedGenerationUpToDate, Degraded)AllUpdated, RolloutInProgress)Ready not NotReady)observedGeneration to track spec-status sync/status endpoint)name and optionally namespaceRef suffixownerReferences for cascade deletioncontroller: true owner)resourceVersion for conflict detectionexample.com/cleanup)action: restart)For each Custom Resource Definition in the operator, review:
1. Spec Fields Review:
*Ref suffix)2. Status Fields Review:
3. Validation Rules:
4. Ownership and Lifecycle:
For each controller in the operator, review:
1. Reconciliation Logic:
2. Watch Configuration:
3. State Management:
4. API Efficiency:
5. Error Handling:
6. Concurrency:
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
Provide an executive summary in this format:
# Kubernetes Operator Design Review - [Operator Name]
**Review Date**: [Date]
**Operator Version**: [Version]
**Reviewer**: [AI Agent/Human]
## Summary Statistics
- **Total Review Items**: [count]
- **PASS**: [count] ([percentage]%)
- **WARNING**: [count] ([percentage]%)
- **FAIL**: [count] ([percentage]%)
## Critical Issues (FAIL)
1. [Issue 1] - [CRD/Controller affected]
2. [Issue 2] - [CRD/Controller affected]
...
## Important Improvements (WARNING)
1. [Improvement 1]
2. [Improvement 2]
...
## Overall Assessment
[Overall compliance level: Excellent | Good | Needs Improvement | Non-Compliant]
[Brief narrative assessment]
## Next Steps
1. [Prioritized action item]
2. [Prioritized action item]
...
To use this skill for an operator review:
Locate the operator code:
# Find CRD definitions
find . -name "*_types.go" -o -name "*.crd.yaml"
# Find controllers
find . -path "*/controllers/*" -name "*.go"
Read the architecture documentation:
Apply this skill:
Prioritize findings: