From 53b6454ee493301ba24d0fe199066791019da587 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Tue, 16 Jul 2024 14:42:45 +0545 Subject: [PATCH] fix: use resource id map when setting up helm parent This will set the parent in the very first run --- scrapers/kubernetes/kubernetes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapers/kubernetes/kubernetes.go b/scrapers/kubernetes/kubernetes.go index 2a95b7cb..d5ea7dfc 100644 --- a/scrapers/kubernetes/kubernetes.go +++ b/scrapers/kubernetes/kubernetes.go @@ -698,7 +698,7 @@ func getKubernetesParent(obj *unstructured.Unstructured, exclusions v1.Kubernete if helmName != "" && helmNamespace != "" { allParents = append([]v1.ConfigExternalKey{{ Type: ConfigTypePrefix + "HelmRelease", - ExternalID: getKubernetesAlias("HelmRelease", helmNamespace, helmName), + ExternalID: lo.CoalesceOrEmpty(resourceIDMap.Get(helmNamespace, "HelmRelease", helmName), getKubernetesAlias("HelmRelease", helmNamespace, helmName)), }}, allParents...) }