Skip to main content

kube_runtime/
lib.rs

1//! Common components for building Kubernetes operators
2//!
3//! This crate contains the core building blocks to allow users to build
4//! controllers/operators/watchers that need to synchronize/reconcile kubernetes
5//! state.
6//!
7//! Newcomers are recommended to start with the [`Controller`] builder, which gives an
8//! opinionated starting point that should be appropriate for simple operators, but all
9//! components are designed to be usable รก la carte if your operator doesn't quite fit that mold.
10
11#![cfg_attr(docsrs, feature(doc_cfg))]
12#![deny(clippy::all)]
13#![deny(clippy::pedantic)]
14// Triggered by many derive macros (kube-derive, educe)
15#![allow(clippy::default_trait_access)]
16#![allow(clippy::type_repetition_in_bounds)]
17// Triggered by educe derives on enums
18#![allow(clippy::used_underscore_binding)]
19// Triggered by Tokio macros
20#![allow(clippy::semicolon_if_nothing_returned)]
21// Triggered by nightly clippy on idiomatic code
22#![allow(clippy::let_underscore_untyped)]
23
24pub mod controller;
25pub mod events;
26
27pub mod finalizer;
28pub mod reflector;
29pub mod scheduler;
30pub mod utils;
31pub mod wait;
32pub mod watcher;
33
34pub use controller::{Config, Controller, applier};
35pub use finalizer::finalizer;
36pub use reflector::reflector;
37pub use scheduler::scheduler;
38pub use utils::WatchStreamExt;
39pub use watcher::{metadata_watcher, watcher};
40
41pub use utils::{Predicate, PredicateConfig, predicates};
42pub use wait::conditions;