1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! An ergonomic Kubernetes API client to manage kubernetes resources
//!
//! **Disclaimer**: This crate is still super very incomplete in functionality.
//! So expect to file issues and PRs to unblock yourself if you actually
//! take this crate as a dependency.
//!
//! ## Basic Usage
//!
//! The `prelude` contains several the main [`Kubernetes`](clients/struct.Kubernetes.html) type
//!   as well as several traits that expose the resource-specific methods for reading and writing
//!   kubernetes resources.
//!
//! ```no_run
//! use kubeclient::prelude::*;
//!
//! let kube = Kubernetes::load_conf("admin.conf")?;
//!
//! if kube.healthy()? {
//!   if !kube.secrets().exists("my-secret")? {
//!     let output = kube.secrets().get("my-secret")?
//!     // ...
//!   }
//!
//!   for node in kube.nodes().list()? {
//!     println!("Found node: {}", node.metadata.name);
//!   }
//! }
//! ```

#[macro_use] extern crate error_chain;
#[macro_use] extern crate serde_derive;

extern crate base64;
extern crate chrono;
extern crate openssl;
extern crate reqwest;
extern crate serde;
extern crate serde_json;
extern crate serde_yaml;
extern crate url;
extern crate url_serde;
extern crate walkdir;

pub mod errors;
pub mod config;
pub mod clients;
pub mod resources;

pub mod prelude {
    pub use clients::{Kubernetes, ReadClient, WriteClient, ListClient};
}

pub use clients::Kubernetes;
pub use config::KubeConfig;
pub use errors::Error;