kube
:BREAKING
: subresource marker traits renamed conjugation:Log
,Execute
,Attach
,Evict
(previouslyLogging
,Executable
,Attachable
,Evictable
) - #536 via #560kube-derive
added#[kube(category)]
attr to set CRD categories - #559kube-runtime
addedfinalizer
helper #291 via #475kube-runtime
added tracing for why reconciliations happened #457 via #571kube-runtime
addedController::reconcile_all_on
to allow scheduling all objects for reconciliation #551 via #555kube-runtime
addedController::graceful_shutdown_on
for shutting down theController
while waiting for running reconciliations to finish - #552 via #573
- BREAKING:
controller::applier
now starts a graceful shutdown when thequeue
terminates - BREAKING:
scheduler
now shuts down immediately whenrequests
terminates, rather than waiting for the pending reconciliations to drain
kube-runtime
added tracking for reconciliation reason
- Added:
Controller::owns_with
andController::watches_with
to pass adyntype
argument for dynamicApi
s - #575 - BREAKING:
controller::trigger_*
now returns aReconcileRequest
rather thanObjectRef
. TheObjectRef
can be accessed via theobj_ref
field
- Api::replace can fail to unset list values with k8s-openapi 0.12 #581
- BREAKING: custom clients via
Client::new
must passconfig.default_namespace
as 2nd arg
- BREAKING:
kube-derive
users must importkube::CustomResourceExt
(orkube::core::crd::v1beta1::CustomResourceExt
if using legacy#[kube(apiextensions = "v1beta1")]
) to use generated methodsFoo::crd
orFoo::api_resource
- BREAKING:
k8s_openapi
bumped to 0.12.0 - #531- Generated structs simplified +
Resource
trait expanded - Adds support for kubernetes
v1_21
- Contains bugfix for kubernetes#102159
- Generated structs simplified +
- BREAKING:
kube::Resource
trait now requires aplural
implementation
- Api::replace can fail to unset list values with k8s-openapi 0.12 #581
kube
: addedApi::default_namespaced
- #209 via #534kube
: addedconfig
feature - #533 via #535kube
: BREAKING: movedclient::discovery
module tokube::discovery
and rewritten module #538
discovery
: addedoneshot
helpers for quick selection of recommended resources / kinds #538discovery
: movedApiResource
andApiCapabilities
(result of discovery) tokube_core::discovery
- BREAKING: removed internal
ApiResource::from_apiresource
- three new examples added:
custom_client
,custom_client_tls
andcustom_client_trace
- Big feature streamlining, big service and layer restructuring, dependency restructurings
- Changes can hit advanced users, but unlikely to hit base use cases with
Api
andClient
. - In depth changes broken down below:
- Add
kube::client::ConfigExt
extendingConfig
for customClient
. This includes methods to configure TLS connection when building a custom client #539native-tls
:Config::native_tls_https_connector
andConfig::native_tls_connector
rustls-tls
:Config::rustls_https_connector
andConfig::rustls_client_config
- Remove the requirement of having
native-tls
orrustls-tls
enabled whenclient
is enabled. Allow one, both or none.- When both, the default Service will use
native-tls
because of #153.rustls
can be still used with a custom client. Users will have an option to configure TLS at runtime. - When none, HTTP connector is used.
- When both, the default Service will use
- Remove TLS features from
kube-runtime
- BREAKING: Features must be removed if specified
- Remove
client
feature fromnative-tls
andrust-tls
featuresconfig
+native-tls
/rustls-tls
can be used independently, e.g., to create a simple HTTP client- BREAKING:
client
feature must be added ifdefault-features = false
ConfigExt::base_uri_layer
(BaseUriLayer
) to set cluster URL (#539)ConfigExt::auth_layer
that returns optional layer to manageAuthorization
header (#539)gzip
: Replaced custom decompression module withDecompressionLayer
fromtower-http
(#539)- Replaced custom
LogRequest
withTraceLayer
fromtower-http
(#539)- Request body is no longer shown
- Basic and Bearer authentication using
AddAuthorizationLayer
(borrowing from tower-rs/tower-http#95 until released) - BREAKING: Remove
headers
fromConfig
. Injecting arbitrary headers is now done with a layer on a custom client.
- Remove
static_assertions
since it's no longer used - Replace
tokio_rustls
withrustls
andwebpki
since we're not usingtokio_rustls
directly - Replace uses of
rustls::internal::pemfile
withrustls-pemfile
- Remove
url
and always usehttp::Uri
- BREAKING:
Config::cluster_url
is nowhttp::Uri
- BREAKING:
Error::InternalUrlError(url::ParseError)
andError::MalformedUrl(url::ParseError)
replaced byError::InvalidUri(http::uri::InvalidUri)
- BREAKING:
kube
:client
feature added (default-enabled) - #528kube
:PatchParams
force now only works withPatch::Apply
#528kube
:api
discovery
module now uses a newApiResource
struct #495 + #482kube
:api
BREAKING:DynamicObject
+Object
now takes anApiResource
rather than aGroupVersionKind
kube
:api
BREAKING:discovery
module'sGroup
renamed toApiGroup
kube
:client
BREAKING:kube::client::Status
moved tokube::core::Status
(accidental, re-adding in 0.56)kube-core
crate factored out ofkube
to reduce dependencies - #516 via #517 + #519 + #522 + #528 + #530kube
:kube::Service
removed to allowkube::Client
to take an abritraryService<http::Request<hyper::Body>>
- #532
- yanked 30 minutes after release due to #525
- changes lifted to 0.55.0
kube
:admission
controller module added under feature - #477 via #484 + fixes in #488 #498 #499 + #507 + #509kube
:config
parsing of pem blobs now resilient against missing newlines - #504 via #505kube
:discovery
module added to simplify dynamic api usage - #491kube
:api
BREAKING:DynamicObject::namespace
renamed to::within
- #502kube
:api
BREAKING: addedResourceExt
trait moving the getters fromResource
trait - #486kube
:api
added a generic interface for subresources viaRequest
- #487kube
:api
fix bug inPatchParams::dry_run
not being serialized correctly - #511
The most likely issue you'll run into is from kube
when using Resource
trait which has been split:
+use kube::api::ResouceExt;
- let name = Resource::name(&foo);
- let ns = Resource::namespace(&foo).expect("foo is namespaced");
+ let name = ResourceExt::name(&foo);
+ let ns = ResourceExt::namespace(&foo).expect("foo is namespaced");
kube-derive
: allow overriding#[kube(plural)]
and#[kube(singular)]
- #458 via #463kube
: added tracing instrumentation for io operations inkube::Api
- #455kube
:DeleteParams
'sPreconditions
is now public - #459 via #460kube
: remove dependency on duplicatederive_accept_key
forws
- #452kube
: Properly verify websocket keys inws
handshake - #447kube
: BREAKING: removed optional, and deprecatedruntime
module - #454kube
: BREAKING:ListParams
bookmarks default enabled - #226 via #445- renames member
::allow_bookmarks
to::bookmarks
::default()
setsbookmark
totrue
to avoid bad bad defaults #219- method
::allow_bookmarks()
replaced by::disable_bookmarks()
- renames member
kube
:DynamicObject
andGroupVersionKind
introduced for full dynamic object supportkube-runtime
: watchers/reflectors/controllers can be used with dynamic objects from api discoverykube
: Pluralisation now only happens fork8s_openapi
objects by default #481- inflector dependency removed #471
- added internal pluralisation helper for
k8s_openapi
objects
kube
: BREAKING: Restructuring of low levelResource
request builder #474Resource
renamed toRequest
and requires only apath_url
to construct
kube
: BREAKING: Mostly internalMeta
trait revamped to support dynamic typeskube-runtime
: BREAKING: lower level interface changes as a result ofkube::api::Meta
trait:
- THESE SHOULD NOT AFFECT YOU UNLESS YOU ARE IMPLEMENTING / CUSTOMISING LOW LEVEL TYPES DIRECTLY
ObjectRef
now generic overkube::Resource
rather thanRuntimeResource
reflector::{Writer, Store}
takes akube::Resource
rather than ak8s_openapi::Resource
kube-derive
: BREAKING: Generated type no longer generatesk8s-openapi
traits
While we had a few breaking changes. Most are to low level internal interfaces and should not change much, but some changes you might need to make:
- if using the old, low-level
kube::api::Resource
, please consider the easierkube::Api
, or look at tests inrequest.rs
ortyped.rs
if you need the low level interface - search replace
kube::api::Meta
withkube::Resource
if used - trait was renamed - if implementing the trait, add
type DynamicType = ();
to the impl - remove calls to
ListParams::allow_bookmarks
(allow default) - handle
WatchEvent::Bookmark
or setListParams::disable_bookmarks()
- look at examples if replacing the long deprecated legacy runtime
The following constants from k8s_openapi::Resource
no longer exist. Please use kube::Resource
and:
- replace
Foo::KIND
withFoo::kind(&())
- replace
Foo::GROUP
withFoo::group(&())
- replace
Foo::VERSION
withFoo::version(&())
- replace
Foo::API_VERSION
withFoo::api_version(&())
kube
Config
now allows arbirary extension objects - #425kube
Config
now allows multiple yaml documents per kubeconfig - #440 via #441kube-derive
now more robust and is usingdarling
- #435- docs improvements to patch + runtime
- feat: added support for stacked kubeconfigs - #132 via #411
- refactor: authentication logic moved out of
kube::config
and into intokube::service
- #409
- BREAKING:
Config::get_auth_header
removed
- refactor: remove
hyper
dependency fromkube::api
- #410 - refactor:
kube::Service
simpler auth and gzip handling - #405 + #408
- dependency on
reqwest
+ removed in favour ofhyper
+tower
#394- refactor:
kube::Client
now useskube::Service
(atower::Service<http::Request<hyper::Body>>
) instead ofreqwest::Client
to handle all requests - refactor:
kube::Client
now uses atokio_util::codec
for internal buffering - refactor:
async-tungstenite
ws feature dependency replaced withtokio-tungstenite
.WebSocketStream
is now created from a connection upgraded withhyper
- refactor:
oauth2
module for GCP OAuth replaced with optionaltame-oauth
dependency - BREAKING: GCP OAuth is now opt-in (
oauth
feature). Note that GCP provider with command based token source is supported by default. - BREAKING: Gzip decompression is now opt-in (
gzip
feature) because Kubernetes does not have compression enabled by default yet and this feature requires extra dependencies. #399 - BREAKING:
Client::new
now takes aService
instead ofConfig
#400. Allows custom service for features not supported out of the box and testing. To create aClient
fromConfig
, useClient::try_from
instead. - BREAKING: Removed
Config::proxy
. Proxy is no longer supported out of the box, but it should be possible by using a custom Service. - fix: Refreshable token from auth provider not refreshing
- fix: Panic when loading config with non-GCP provider #238
- refactor:
- feat: subresource support added for
Evictable
types (marked forPod
) - #393 kube
: subresource marker traits renamed toLoggable
,Executable
,Attachable
(previouslyLoggingObject
,ExecutingObject
,AttachableObject
) - #395examples
showcasingkubectl cp
like behaviour #381 via #392
- bump
k8s-openapi
to0.11.0
- #388 - breaking:
kube
: no longer necessary to serialize patches yourself - #386PatchParams
removesPatchStrategy
Api::patch*
methods now take an enumPatch
type- optional
jsonpatch
feature added forPatch::Json
- chore: upgrade
tokio
to1.0
- #363- BREAKING: This requires the whole application to upgrade to
tokio
1.0 andreqwest
to 0.11.0
- BREAKING: This requires the whole application to upgrade to
- docs: fix broken documentation in
kube
0.46.0 #367 - bug:
kube
: removed panics fromws
features, fixrustls
support + improve docs #369 via #370 + #373 - bug:
AttachParams
now fixes owned method chaining (slightly breaks from 0.46 if using &mut ref before) - #364 - feat:
AttachParams::interactive_tty
convenience method added - #364 - bug: fix
Runner
(and thusController
andapplier
) not waking correctly when starting new tasks - #375
- maintenance release for 0.46 (last supported tokio 0.2 release) from
tokio02
branch - bug backport: fix
Runner
(and thusController
andapplier
) not waking correctly when starting new tasks - #375
- feat:
kube
now has optional websocket support withasync_tungstenite
underws
andws-*-tls
features #360 - feat:
AttachableObject
marker trait added and implemented fork8s_openapi::api::core::v1::Pod
#360 - feat:
AttachParams
added forApi::exec
andApi::attach
forAttachableObject
s #360 - examples:
pod_shell
,pod_attach
,pod_exec
demonstrating the new features #360
- feat:
kube-derive
now has a default enabledschema
feature- allows opting out of
schemars
dependency for handwriting crds - #355
- allows opting out of
- breaking:
kube-derive
attrstruct_name
renamed tostruct
- #359 - docs: improvements on
kube
,kube-runtime
,kube-derive
- feat:
kube-derive
now generates openapi v3 schemas and is thus usable with v1CustomResourceDefinition
- #129 and #264 via #348- BREAKING:
kube-derive
types now requireJsonSchema
derived viaschemars
libray (not breaking if going to 0.45.0)
- BREAKING:
- feat:
kube_runtime::controller
: now reconciles objects in parallel - #346- BREAKING:
kube_runtime::controller::applier
now requires that thereconciler
'sFuture
isUnpin
,Box::pin
it or submit it to a runtime if this is not acceptable - BREAKING:
kube_runtime::controller::Controller
now requires that thereconciler
'sFuture
isSend + 'static
, use the low-levelapplier
interface instead if this is not acceptable
- BREAKING:
- bug:
kube-runtime
: removed accidentally includedk8s-openapi
default features (you have to opt in to them yourself) - feat:
kube
:TypeMeta
now derives additionallyDebug, Eq, PartialEq, Hash
- bump:
k8s-openapi
to0.10.0
- #330 - bump:
serde_yaml
- #349 - bump:
dirs
todirs-next
- #340
- bug:
kube-derive
attr#[kube(shortname)]
now working correctly - bug:
kube-derive
now working with badly cased existing types - #313 - missing:
kube
now correctly exportsconfig::NamedAuthInfo
- #323 - feat:
kube
: exposeConfig::get_auth_header
for istio use cases - #322 - feat:
kube
: local config now tackles gcloud auth exec params - #328 and #84 kube-derive
now actually requires GVK (in particular#[kube(kind = "Foo")]
which we sometimes inferred earlier, despite documenting the contrary)
- bug:
kube-derive
'sDefault
derive now sets typemeta correctly - #315 - feat:
ListParams
now supportscontinue_token
andlimit
- #320
- yanked release. failed publish.
DynamicResource::from_api_resource
added to allow apiserver returned resources - #305 via #301Client::list_api_groups
addedClient::list_ap_group_resources
addedClient::list_core_api_versions
addedClient::list_core_api_resources
addedkube::DynamicResource
exposed at top level- Bug:
PatchParams::default_apply()
now requires a manager and renamed toPatchParams::apply(manager: &str)
for #300 - Bug:
DeleteParams
no longer missing forApi::delete_collection
- #53 - Removed paramter
ListParams::include_uninitialized
deprecated since 1.14 - Added optional
PostParams::field_manager
was missing forApi::create
case
- Bug:
ObjectRef
tweak inkube-runtime
to allow controllers triggering across cluster and namespace scopes - #293 via #294 - Feature:
kube
now has aderive
feature which will re-exportkube::CustomResource
fromkube-derive::CustomResource
. - Examples: revamp examples for
kube-runtime
- #201
- Marked
kube::runtime
module as deprecated - #281 Config::timeout
can now be overridden toNone
(with caveats) #280- Bug: reflector stores could have multiple copies inside datastore - #286
dashmap
backend Store driver downgraded - #286Store::iter
temporarily removed
- Bug: Specialize WatchEvent::Bookmark so they can be deserialized - #285
- Docs: Tons of docs for kube-runtime
- Bump
k8s-openapi
to0.9.0
- All runtime components now require
Sync
objects - reflector/watcher/Controller streams can be shared in threaded environments
- https://gitlab.com/teozkr/kube-rt/ merged in for a new
kube-runtime
crate #258 Controller<K>
added (#148 via #258)Reflector
api redesigned (#102 via #258)- Migration release for
Informer
->watcher
+Reflector
->reflector
kube::api::CustomResource
removed in favour ofkube::api::Resource::dynamic
CrBuilder
removed in favour ofDynamicResource
(with new error handling)- support level bumped to beta
- Fix in-cluster Client when using having multiple certs in the chain - #251
Config::proxy
support added - #246PartialEq
can be derived withkube-derive
- #242- Windows builds no longer clashes with runtime - #240
- Rancher hosts (with path specifiers) now works - #244
- Bump
k8s-openapi
to0.8.0
Config::from_cluster_env
<- renamed fromConfig::new_from_cluster_env
Config::from_kubeconfig
<- renamed fromConfig::new_from_kubeconfig
Config::from_custom_kubeconfig
added - #236- Majorly overhauled error handlind in config module - #237
- add missing tokio
signal
feature as a dependency - upgrade all dependencies, including minor bumps to rustls and base64
- Major
config
+client
module refactor Config
is the newConfiguration
structClient
is now just a configuredreqwest::Client
plus areqwest::Url
- implement
From<Config> for reqwest::ClientBuilder
- implement
TryFrom<Config> for Client
Client::try_default
orClient::new
now recommended constructors- People parsing
~/.kube/config
must use theKubeConfig
struct instead Reflector<K>
now only takes anApi<K>
to construct (.params method)Informer<K>
now only takes anApi<K>
to construct (.params method)Informer::init_from
->Informer::set_version
Reflector
now self-polls #151 + handles signals #152Reflector::poll
made private in favour ofReflector::run
Api::watch
no longer filters out error events (next
->try_next
)Api::watch
returnsResult<WatchEvent>
rather thanWatchEvent
WatchEvent::Bookmark
added to enumListParams::allow_bookmarks
addedPatchParams::default_apply
ctor addedPatchParams
builder mutators:::force
and::dry_run
added
- Expose
config::Configuration
at root level - Add
Configuration::infer
as a recommended constructor - Rename
client::APIClient
toclient::Client
- Expose
client::Client
at root level Client
now implementsFrom<Configuration>
- Added comprehensive documentation on
Api
- Rename
config::KubeConfigLoader
->config::ConfigLoader
- removed
futures-timer
dependency fortokio
(feature=timer)
- Fix
#[kube(printcolumn)]
when#[kube(apiextensions = "v1beta1")]
- Fix
#[kube(status)]
causing serializes of empty optional statuses
Api::log
->Api::logs
(now matchesResource::logs
)Object<FooSpec, FooStatus>
back for ad-hoc ser/de- kube-derive now derives
Debug
(requiresDebug
on spec struct) - kube-derive now allows multiple derives per file
Api::create
now takes dataK
rather than bytesApi::replace
now takes dataK
rather than bytes- (note that
Resource::create
andResource::replace
still takes bytes)
- (note that
#[derive(CustomResource)]
now implements::new
on the generatedKind
- derived
Kind
now properly containsTypeMeta
- #170
RawApi
removed ->Resource
addedResource
implementsk8s_openapi::Resource
- ALL OBJECTS REMOVED -> Depening on light version of
k8s-openapi
now- NB: should generally just mean a few import changes (+casings / unwraps)
openapi
feature removed (light dependency mandatory now)- LIBRARY WORKS WITH ALL
k8s_openapi
KUBERNETES OBJECTS KubeObject
trait removed in favour ofMeta
traitObject<FooSpec, FooStatus>
removed -> types implementingk8s_openapi::Resource
required insteadkube-derive
crate added to derive this trait + other kubebuilder like codegen
Reflector
+Informer
moved fromkube::api
tokube::runtime
Informer
now resets the version to 0 rather than dropping events - #134- Removed
Informer::init
, since it is now a no-op when building theInformer
- Removed
- Downgrade spurious log message when using service account auth
- Fix a large percentage of EOFs from watches #146
- => default timeout down to 290s from 300s
- =>
Reflector
now re-lists a lot less #146 - Fix decoder panic with async-compression (probably) #144
Informer::poll
can now be used withTryStream
- Exposed
Config::read
andConfig::read_from
- #124 - Fix typo on
Api::StatefulSet
- Fix typo on
Api::Endpoints
- Add
Api::v1CustomResourceDefinition
when on k8s >= 1.17 - Renamed
Void
toNotUsed
- initial rustls support #114 (some local kube config issues know #120)
- crate does better version checking against openapi features - #106
- initial
log_stream
support - #109
- Add support for ServiceAccount, Role, ClusterRole, RoleBinding, Endpoint - #113 + #111
- Upgrade k8s-openapi to 0.7 => breaking changes: https://github.com/Arnavion/k8s-openapi/blob/master/CHANGELOG.md#v070-2020-01-23
- Bump tokio and reqwest to 0.2 and 0.10
- Fix bug in
log
fetcher - #107 - Temporarily allow invalid certs when testing on macosx - #105
- Allow sharing Reflectors between threads - #97
- Fix Reflector pararall lock issue (
poll
no longer blocksstate
)
- Improve Reflector reset algorithm (clear history less)
- Default watch timeouts changed to 300s everywhere
- This increases efficiency of Informers and Reflectors by keeping the connection open longer.
- However, if your Reflector relies on frequent polling you can set
timeout
or hide thepoll()
in a different context so it doesn't block your main work - Internal
RwLock
changed to afutures::Mutex
for soundness / proper non-blocking - #94 - blocking
Reflector::read()
renamed toasync Reflector::state()
- Expose
metadata.creation_timestamp
and.deletion_timestamp
(behind openapi flag) - #93
- ObjectList now implements Iterator - #91
- openapi feature no longer accidentally hardcoded to v1.15 feature - #90
- kube::Error is now a proper error enum and not a Fail impl (thiserror)
- soft-tokio dependency removed for futures-timer
- gzip re-introduced
- Fix unpinned gzip dependency breakage - #87
- api converted to use async/await with 1.39.0 (primitively)
- hyper upgraded to 0.10-alpha
- synchronous sleep replaced with tokio timer
Log
trait removed in favour of internal marker trait
- Add support for oidc providerss with
auth-provider
w/oaccess-token
- #70 - Bump most dependencies to more recent versions
- Expose custom client creation
- Added support for
v1beta1Ingress
- Expose incluster_config::load_default_ns - #74
- Add missing
uid
field onObjectMeta::ownerReferences
- Add
Reflector::get
andReflector::get_within
as cheaper getters - Add support for OpenShift kube configs with multiple CAs - via #64
- Add missing
ObjectMeta::ownerReferences
- Reduced memory consumption during compile with
[email protected]
- #62
- Fix compile issue on
1.37.0
withUtc
serialization - Fix
Void
not havingSerialize
derive
- Added support for
v1Job
resources - via #58 - Added support for
v1Namespace
,v1DaemonSet
,v1ReplicaSet
,v1PersistentVolumeClaim
,v1PersistentVolume
,v1ResourceQuota
,v1HorizontalPodAutoscaler
- via #59 - Added support for
v1beta1CronJob
,v1ReplicationController
,v1VolumeAttachment
,v1NetworkPolicy
- via #60 k8s-openapi
optional dependency bumped to0.5.0
(for kube 1.14 structs)
Reflector::read
now returns aVec<K>`` rather than a
Vec<(name, K)>`: This fixes an unsoundness bug internally - #56 via @gnieto
- Experimental oauth2 support for some providers - via #44 :
- a big cherry-pick from various prs upstream originally for GCP
- EKS works with setup in kube-rs#20 (comment)
- Added support for
Log
subresource - via #50 - Added support for
v1ConfigMap
with example - via #49 - Demoted some spammy info messages from Reflector
- Added
PatchParams
withPatchStrategy
to allow arbitrary patch types - #24 via @ragne Event
renamed tov1Event
to match non-slowflake type namesv1Service
support added- Added
v1Secret
snowflake type and asecret_reflector
example
-
Api<P, U>
is nowApi<K>
for someKubeObject
K:- Big change to allow snowflake objects (#35) - but also slightly nicer
- You want aliases
type Pod = Object<PodSpec, PodStatus>
- This gives you the required
KubeObject
trait impl for free
-
Added
Event
native type to prove snowflakes can be handled - #35 -
ApiStatus
renamed toStatus
to match kube api conventions #36 -
Rename
Metadata
toObjectMeta
#36 -
Added
ListMeta
forObjectList
andStatus
#36 -
Added
TypeMeta
object which is flattened ontoObject
, so:o.types.kind
rather thano.kind
o.types.version
rather thano.version
- Status subresource api commands added to
Api
:patch_status
get_status
replace_status
^ Seecrd_openapi
orcrd_api
examples
- Scale subresource commands added to
Api
:patch_scale
get_scale
replace_scale
^ Seecrd_openapi
example
- Typed
Api
variant calledOpenApi
introduced (see crd_openapi example) - Revert
client.request
return type change (back to response only from pre-0.7.0 #28) delete
now returns `Either<Object<P, U>, ApiStatus> - for bug#32delete_collection
now returns `Either<ObjectList<Object<P, U>>, ApiStatus> - for bug#32Informer::new
renamed toInformer::raw
Reflector::new
renamed toReflector::raw
Reflector::new
+Informer::new
added for "openapi" compile time feature (does not require specifying the generic types)
- Expose list/watch parameters #11
- Many API struct renames:
ResourceMap
->Cache
Resource
->Object
ResourceList
->ObjectList
ApiResource
->Api
ResourceType
has been removed in favour ofApi::v1Pod()
sayObject::status
now wrapped in anOption
(not present everywhere)ObjectList
exposed- Major API overhaul to support generic operations on
Object
- Api can be used to perform generic actions on resources:
create
get
delete
watch
list
patch
replace
get_scale
(when scale subresource exists)patch_scale
(ditto)replace_scale
(ditto)get_status
(when status subresource exists)patch_status
(ditto)replace_status
(ditto)
- crd_api example added to track the action api
- Bunch of generic parameter structs exposed for common operations:
ListParams
exposedDeleteParams
exposedPostParams
exposed
- Errors from
Api
exposed inkube::Error
:Error::api_error -> Option<ApiError>
exposed- Various other error types also in there (but awkward setup atm)
client.request
now returns a tuple(T, StatusCode)
(before onlyT
)
- Expose getter
Informer::version
- Exose ctor
Informer::from_version
- Expose more attributes in
Metadata
Informer::reset
convenience method addedInformer::poll
no longer returns events straight- an
Informer
now cachesWatchEvent
elements into an internal queue Informer::pop
pops a single element from its internal queueReflector::refresh
renamed toReflector::reset
(matchesInformer
)Void
type added so we can useReflector<ActualSpec, Void>
- removes need for Spec/Status structs:
ReflectorSpec
,ReflectorStatus
removedInformerSpec
,InformerStatus
removedResourceSpecMap
,ResourceStatusMap
removed
WatchEvents
removedWatchEvent
exposed, and now wraps `Resource<T, U>``
- added
Informer
struct dedicated to handling events - Reflectors no longer cache
events
- see #6
- ResourceMap now contains the full Resource<T,U> struct rather than a tuple as the value. =>
value.metadata
is available in the cache. - Reflectors now also cache
events
to allow apps to handle them
Named
trait removed (inferring from metadata.name now)- Reflectors now take two type parameters (unless you use
ReflectorSpec
orReflectorStatus
) - see examples for usage - Native kube types supported via
ApiResource
- Some native kube resources have easy converters to
ApiResource