Skip to content

Commit

Permalink
document changes and write a small migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
clux committed Mar 28, 2021
1 parent eb1a8fb commit 31f2e90
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,41 @@ UNRELEASED
- renames member `::allow_bookmarks` to `::bookmarks`
- `::default()` sets `bookmark` to `true` to avoid bad bad defaults #219
- method `::allow_bookmarks()` replaced by `::disable_bookmarks()`
* `kube`: BREAKING: Mostly internal changes to the `Meta` trait to support dynamic types #385
- BREAKING: `Meta` trait now takes an optional associated type for runtime type info: `Family`
* THIS SHOULD NOT AFFECT YOU UNLESS YOU ARE IMPLEMENTING / CUSTOMISING THE TRAIT DIRECTLY
- New dynamic helper object `GroupVersionKind` introduced
- `DynamicObject` added to represent a dynamic kubernetes object
* `kube`: `DynamicObject` and `GroupVersionKind` introduced for full dynamic object support
* `kube`: Pluralisation now only happens for `k8s_openapi` objects by default #481
- inflector dependency removed #471
- added internal pluralisation helper for `k8s_openapi` objects
* `kube`: BREAKING: Restructuring of old `Resource` request builder #474
- `Resource` renamed to `Request` and requires only a `path_url` to construct
* `kube`: BREAKING: Mostly internal `Meta` trait revamp to support dynamic types
- `Meta` renamed to `kube::Resource` to mimic `k8s_openapi::Resource` #478
- The trait now takes an optional associated type for runtime type info: `DynamicType` #385
- `Api::all_with` + `Api::namespaced_with` added for querying with dynamic families
- see `dynamic_watcher` example
- see `dynamic_watcher` + `dynamic_api` for example usage
* `kube-runtime`: BREAKING: lower level interface changes as a result of `kube::api::Meta` trait:
- THESE SHOULD NOT AFFECT YOU UNLESS YOU ARE IMPLEMENTING / CUSTOMISING LOW LEVEL TYPES DIRECTLY
- `ObjectRef` now generic over `K: Meta` rather than `RuntimeResource`
- `reflector::{Writer, Store}` takes a `K: Meta` rather than a `K: k8s_openapi::Resource`
- `ObjectRef` now generic over `kube::Resource` rather than `RuntimeResource`
- `reflector::{Writer, Store}` takes a `kube::Resource` rather than a `k8s_openapi::Resource`
- Possible to use `watcher` or `Controller`'s on `GroupVersionKind` types now.

* `kube-derive`: BREAKING: Generated type no longer generates `k8s-openapi` traits
- Should not affect

### 0.52.0 Migration Guide
While we had a few breaking changes, most are to low level internal interfaces and should not change much. The few changes you might need to make (in order of likelihood):

#### kube
- search replace `kube::api::Meta` with `kube::Resource` if used - trait was renamed
- if implementing the trait, add `type DynamicType = ();` to the impl
- remove calls to `ListParams::allow_bookmarks`
- look at examples if replacing the long deprecated legacy runtime
- if using the old, low-level `kube::api::Resource`, please consider the easier `kube::Api`, or look at tests in `request.rs` or `typed.rs` if you need the low level interface

#### kube-derive
The following constants from `k8s_openapi::Resource` no longer exist. Please `use kube::Resource` and:
- replace `Foo::KIND` with `Foo::kind(&())`
- replace `Foo::GROUP` with `Foo::group(&())`
- replace `Foo::VERSION` with `Foo::version(&())`
- replace `Foo::API_VERSION` with `Foo::api_version(&())`

0.51.0 / 2021-02-28
===================
Expand Down

0 comments on commit 31f2e90

Please sign in to comment.