All the ways to mock your Rust code
Summary
This post surveys multiple strategies for mocking Kubernetes API interactions in Rust controllers, comparing patterns like boxed trait objects, generics, compile-time flags, and even fake apiservers. It walks through code sketches and evaluates trade-offs (boilerplate, performance, testability), ending with a pragmatic Arc-based approach. Useful for Rust/DevOps practitioners building Kubernetes operators who care about test reliability.