Skip to content

Commit

Permalink
Fix HPAKey
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaveMyYard committed May 3, 2024
1 parent dce207f commit 43ffb7f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _build_scannable_object(self, item: Any, container: V1Container, kind: Optio
kind=kind,
container=container.name,
allocations=ResourceAllocations.from_container(container),
hpa=self._hpa_list.get(HPAKey(namespace, kind, name)),
hpa=self._hpa_list.get(HPAKey(namespace=namespace, kind=kind, name=name)),
)
obj._api_resource = item
return obj
Expand Down Expand Up @@ -259,9 +259,9 @@ async def __list_hpa_v1(self) -> dict[HPAKey, HPAData]:

return {
HPAKey(
hpa.metadata.namespace,
hpa.spec.scale_target_ref.kind,
hpa.spec.scale_target_ref.name,
namespace=hpa.metadata.namespace,
kind=hpa.spec.scale_target_ref.kind,
name=hpa.spec.scale_target_ref.name,
): HPAData(
min_replicas=hpa.spec.min_replicas,
max_replicas=hpa.spec.max_replicas,
Expand Down

0 comments on commit 43ffb7f

Please sign in to comment.