From 21096ecbaf07e533266ed49097db4ad83ead550f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=96=D1=83=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2?= <33721692+LeaveMyYard@users.noreply.github.com> Date: Wed, 31 May 2023 15:43:11 +0300 Subject: [PATCH] Fix running inside cluster error --- robusta_krr/core/models/objects.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robusta_krr/core/models/objects.py b/robusta_krr/core/models/objects.py index 84e468e4..72694fdf 100644 --- a/robusta_krr/core/models/objects.py +++ b/robusta_krr/core/models/objects.py @@ -1,5 +1,6 @@ import pydantic as pd +from typing import Optional from robusta_krr.core.models.allocations import ResourceAllocations @@ -12,7 +13,8 @@ def __hash__(self) -> int: class K8sObjectData(pd.BaseModel): - cluster: str + # NOTE: Here None means that we are running inside the cluster + cluster: Optional[str] name: str container: str pods: list[PodData]