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 6d0edef commit 2367a88Copy full SHA for 2367a88
1 file changed
rust/stackable-cockpit/src/utils/k8s/client.rs
@@ -331,11 +331,14 @@ impl Client {
331
.await
332
.into_iter()
333
.filter(|(_, capability)| {
334
- capability.supports_operation(discovery::verbs::LIST)
335
- && match namespace {
336
- Some(_) => capability.scope == kube::discovery::Scope::Namespaced,
337
- None => capability.scope == kube::discovery::Scope::Cluster,
338
- }
+ let listing_supported = capability.supports_operation(discovery::verbs::LIST);
+
+ let scope_matching = match namespace {
+ Some(_) => capability.scope == kube::discovery::Scope::Namespaced,
+ None => capability.scope == kube::discovery::Scope::Cluster,
339
+ };
340
341
+ listing_supported && scope_matching
342
});
343
344
for (api_resource, _) in api_resources {
0 commit comments