We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a8cfa commit 31817b1Copy full SHA for 31817b1
rust/operator-binary/src/listener_controller.rs
@@ -41,6 +41,22 @@ pub async fn run(client: stackable_operator::client::Client) {
41
let listener_store = controller.store();
42
controller
43
.owns(client.get_all_api::<Service>(), watcher::Config::default())
44
+ .watches(
45
+ client.get_all_api::<ListenerClass>(),
46
+ watcher::Config::default(),
47
+ {
48
+ let listener_store = listener_store.clone();
49
+ move |listenerclass| {
50
+ listener_store
51
+ .state()
52
+ .into_iter()
53
+ .filter(move |listener| {
54
+ listener.spec.class_name == listenerclass.metadata.name
55
+ })
56
+ .map(|l| ObjectRef::from_obj(&*l))
57
+ }
58
+ },
59
+ )
60
.watches(
61
client.get_all_api::<Endpoints>(),
62
watcher::Config::default(),
0 commit comments