koprs 0.5.4

A reusable, ergonomic library that streamlines Kubernetes operator development, allowing developers to build controllers with significantly less code.
Documentation
//! # koprs
//!
//! Generic, reusable Kubernetes resource utilities for Rust operators.
//!
//! Provides a thin, ergonomic layer on top of [`kube`] for the most common
//! operator patterns: applying and deleting resources (cluster-scoped and
//! namespaced), patching status subresources, managing finalizers, garbage
//! collecting orphaned resources, watching resources for changes, and listing
//! resources with optional label selectors.
//!
//! All functions are generic over the resource type `T` / `K` so you write the
//! pattern once and reuse it across every CRD or built-in type in your operator.
//!
//! ## Quick start
//!
//! ```no_run
//! use koprs::error::KubeGenericError;
//! use kube::Client;
//! use koprs::resources::{apply_namespaced_resource, delete_namespaced_resource};
//! use k8s_openapi::api::apps::v1::Deployment;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), KubeGenericError> {
//!     let client = Client::try_default().await?;
//!     let deployment: Deployment = todo!("build your desired state");
//!
//!     apply_namespaced_resource(client.clone(), "my-namespace", &deployment, "my-operator").await?;
//!     Ok(())
//! }
//! ```

pub mod error;
pub mod finalizers;
pub mod gc;
pub mod resources;
pub mod scope;
pub mod status;
pub mod traits;
pub mod watcher;

pub use error::KubeGenericError;

#[cfg(test)]
mod tests;