Skip to content

Commit

Permalink
Merge branch 'main' into cel-expression-on-crds
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil-Grigorev authored Nov 3, 2024
2 parents d32bfe5 + 179936a commit 4eec7d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ body:
description: |
What type of kubernetes cluster you are running aginst (k3s/eks/aks/gke/other) and what is OS in your `Dockerfile`?
placeholder: |
Output of `kubectl version --short`
Output of `kubectl version`
Dockerfile OS
validations:
required: true
Expand Down
18 changes: 10 additions & 8 deletions kube-runtime/src/utils/watch_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ pub trait WatchStreamExt: Stream {
/// [`ReflectHandle`]: crate::reflector::dispatcher::ReflectHandle
/// ## Usage
/// ```no_run
/// # use futures::{pin_mut, Stream, StreamExt, TryStreamExt};
/// # use futures::StreamExt;
/// # use std::time::Duration;
/// # use tracing::{info, warn};
/// use kube::{Api, Client, ResourceExt};
/// use kube::{Api, ResourceExt};
/// use kube_runtime::{watcher, WatchStreamExt, reflector};
/// use k8s_openapi::api::apps::v1::Deployment;
/// # async fn wrapper() -> Result<(), Box<dyn std::error::Error>> {
Expand All @@ -226,7 +226,7 @@ pub trait WatchStreamExt: Stream {
/// let deploys: Api<Deployment> = Api::default_namespaced(client);
/// let subscriber_buf_sz = 100;
/// let (reader, writer) = reflector::store_shared::<Deployment>(subscriber_buf_sz);
/// let subscriber = &writer.subscribe().unwrap();
/// let subscriber = writer.subscribe().unwrap();
///
/// tokio::spawn(async move {
/// // start polling the store once the reader is ready
Expand All @@ -238,6 +238,13 @@ pub trait WatchStreamExt: Stream {
/// }
/// });
///
/// tokio::spawn(async move {
/// // subscriber can be used to receive applied_objects
/// subscriber.for_each(|obj| async move {
/// info!("saw in subscriber {}", &obj.name_any())
/// }).await;
/// });
///
/// // configure the watcher stream and populate the store while polling
/// watcher(deploys, watcher::Config::default())
/// .reflect_shared(writer)
Expand All @@ -250,11 +257,6 @@ pub trait WatchStreamExt: Stream {
/// })
/// .await;
///
/// // subscriber can be used to receive applied_objects
/// subscriber.for_each(|obj| async move {
/// info!("saw in subscriber {}", &obj.name_any())
/// }).await;
///
/// # Ok(())
/// # }
/// ```
Expand Down

0 comments on commit 4eec7d8

Please sign in to comment.