Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MikailBag committed Jan 15, 2021
1 parent fd203f8 commit 3de7ad5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/generic_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async fn main() -> Result<()> {
let watcher = watcher(api, ListParams::default());
try_flatten_applied(watcher)
.try_for_each(|p| async move {
log::debug!("Applied: {}", Meta::name(&p));
log::info!("Applied: {}", Meta::name(&p));
Ok(())
})
.await?;
Expand Down
9 changes: 8 additions & 1 deletion kube/src/api/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,14 @@ pub struct ErasedKind {
}

/// The most generic representation of a single Kubernetes resource.
pub type DynamicObject = crate::api::Object<serde_json::Value, serde_json::Value>;
#[derive(serde::Serialize, serde::Deserialize, Clone)]
pub struct DynamicObject {
/// standard metadata
pub metadata: ObjectMeta,
/// All other data. Meaning of this field depends on specific object.
#[serde(flatten)]
pub data: serde_json::Value
}

impl Meta for DynamicObject {
type Family = ErasedKind;
Expand Down

0 comments on commit 3de7ad5

Please sign in to comment.