We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc8d42a commit d684623Copy full SHA for d684623
1 file changed
utilities/infra.py
@@ -368,10 +368,10 @@ def is_managed_cluster(client: DynamicClient) -> bool:
368
369
platform_statuses = infra.instance.status.platformStatus
370
371
- for entries in platform_statuses.values():
372
- if isinstance(entries, kubernetes.dynamic.resource.ResourceField):
373
- if tags := entries.resourceTags:
374
- return next(b["value"] == "true" for b in tags if b["key"] == "red-hat-managed")
+ for entry in platform_statuses.values():
+ if isinstance(entry, kubernetes.dynamic.resource.ResourceField):
+ if tags := entry.resourceTags:
+ return any([tag["value"] == "true" for tag in tags if tag["key"] == "red-hat-managed"])
375
376
return False
377
0 commit comments