Skip to content

Commit

Permalink
don't enable k8s-openapi features direct - fixes #44
Browse files Browse the repository at this point in the history
  • Loading branch information
clux committed Jul 10, 2019
1 parent 4360d46 commit 26eaa13
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ openssl = "0.10.12"
http = "0.1.17"
url = "1.7.2"
log = "0.4.6"
k8s-openapi = { version = "0.4.0", features = ["v1_13"], optional = true }
k8s-openapi = { version = "0.4.0", optional = true }
either = "1.5.2"

[features]
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ Rust client for [Kubernetes](http://kubernetes.io) in the style of [client-go](h

This client caters to the more common controller/operator case, but allows you to compile with the `openapi` feature to get accurate struct representations via [k8s-openapi](/~https://github.com/Arnavion/k8s-openapi).

## Installation
To use the openapi generated types:

```toml
kube = { version = "0.11.0", features = ["openapi"] }
k8s-openapi = { version = "0.4.0", features = ["v1_13"] }
```

otherwise:

```toml
kube = "0.11.0"
```

The latter is fine in a CRD-only use case.

## Usage
See the [examples directory](./examples) for how to watch over resources in a simplistic way.

Expand Down Expand Up @@ -131,6 +147,7 @@ or for the reflectors:
cargo run --example pod_reflector --features=openapi
cargo run --example node_reflector --features=openapi
cargo run --example deployment_reflector --features=openapi
cargo run --example secret_reflector --features=openapi
```

for one based on a CRD, you need to create the CRD first:
Expand Down

0 comments on commit 26eaa13

Please sign in to comment.