Skip to content

Commit

Permalink
Documentation cleanup around Api core_methods and dynamic_watcher (
Browse files Browse the repository at this point in the history
…#1158)

* Minor fixes to metadata watcher examples

- makes dyn watcher runnable without clux.dev crds

Signed-off-by: clux <[email protected]>

* Fixup core_methods Api docs to use async_wrapper

Also add better examples to metadata api and using new conversion.

Signed-off-by: clux <[email protected]>

* ping hooks - 2023-03-03

Signed-off-by: clux <[email protected]>

---------

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux authored Mar 5, 2023
1 parent edb7aae commit 80d43fd
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 207 deletions.
4 changes: 2 additions & 2 deletions examples/dynamic_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async fn main() -> anyhow::Result<()> {
let watch_metadata = env::var("WATCH_METADATA").map(|s| s == "1").unwrap_or(false);

// Take dynamic resource identifiers:
let group = env::var("GROUP").unwrap_or_else(|_| "clux.dev".into());
let group = env::var("GROUP").unwrap_or_else(|_| "".into());
let version = env::var("VERSION").unwrap_or_else(|_| "v1".into());
let kind = env::var("KIND").unwrap_or_else(|_| "Foo".into());
let kind = env::var("KIND").unwrap_or_else(|_| "Pod".into());

// Turn them into a GVK
let gvk = GroupVersionKind::gvk(&group, &version, &kind);
Expand Down
Loading

0 comments on commit 80d43fd

Please sign in to comment.