This PR introduces a new controller package that provides a simple, type-safe
framework for building Kubernetes controllers. The implementation is inspired
by Knative's controller patterns but optimized for simplicity.
Key features:
- Simple reconciler interface with just one method (ReconcileKind)
- Automatic detection and persistence of object changes
- Built-in conflict resolution with retry logic
- Owner reference support for watching owned resources
- Error handling patterns (RequeueAfter, RequeueImmediately, PermanentError)
- Context-aware logging with clog integration
- Full test coverage including e2e tests
The framework handles the complexity of update detection, conflict resolution,
and status updates automatically, allowing users to focus on their business logic.
Also includes:
- Comprehensive documentation in controller/README.md
- Example controller implementation in examples/controller/
- Updates to use errors.Is pattern for error checking
- Minor refactoring to use "if err := ..." idiom where appropriate
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix syntax error in Inform method (< to ,)
- Add missing CRUD operations: Update, Delete, and Patch methods
- Add comprehensive test coverage for all client operations
- Update Kubernetes dependencies from v0.21.1 to v0.31.11
- Update Go version requirement to 1.22.0
- Update README to remove outdated Go 1.18 beta references
- Improve error handling and logging
The client now provides full CRUD functionality with type-safe generic
operations for any Kubernetes resource type, significantly reducing
boilerplate compared to traditional client-go usage.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>