Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion operator/resourcehandle.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ async def watch_other(cls, logger) -> None:
logger.info("Starting watch for ResourceHandles managed by other handlers.")
try:
# Clear stale cache entries
for resource_handle in cls.all_instances.values():
for resource_handle in list(cls.all_instances.values()):
if (
resource_handle.resource_handler_idx != Poolboy.resource_handler_idx and
resource_handle.last_seen < last_start
Expand Down
11 changes: 7 additions & 4 deletions operator/resourcepool.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,14 @@ async def manage(self, logger: kopf.ObjectLogger):
available_resource_handles.append(resource_handle)
if resource_handle.is_ready:
ready_resource_handles.append(resource_handle)
resource_handles_for_status.append({
"healthy": resource_handle.is_healthy,
resource_handle_for_status = {
"name": resource_handle.name,
"ready": resource_handle.is_ready,
})
}
if resource_handle.is_healthy is not None:
resource_handle_for_status['healthy'] = resource_handle.is_healthy
if resource_handle.is_ready is not None:
resource_handle_for_status['ready'] = resource_handle.is_ready
resource_handles_for_status.append(resource_handle_for_status)

min_available_deficit = self.min_available - len(available_resource_handles)
resource_pool_scaling = await ResourcePoolScaling.get_active_scaling_for_pool(self.name)
Expand Down
Loading