-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite dynamic api example #466
Conversation
This example now shows how one can use kube to inspect arbitrary resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits. appreciate the quick pr!
examples/dynamic_api.rs
Outdated
None => { | ||
println!("\t\t{}", name); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DynamicObject
implements Meta
now, right. We can use Meta::name
and Meta::namespace
here for a one-liner?
examples/dynamic_api.rs
Outdated
} | ||
println!("\t{}", ar.kind); | ||
let api = DynamicResource::from_api_resource(&ar, &apis.group_version) | ||
.into_api::<DynamicObject>(client.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is anything here dealing with namespaces, or is it just cluster / all querying?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are listing objects from all namespaces.
I will add an option to only list resources from one namespace.
Did a small cleanup to it in master to remove the special casing after we merged #470. |
This example now shows how one can use kube to inspect arbitrary
resources.