From 5fae642172557897e7b41907ed4a9abbf7484db8 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Tue, 16 Jul 2024 11:46:00 +0545 Subject: [PATCH] chore: fix direction for service relationship --- scrapers/kubernetes/kubernetes.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scrapers/kubernetes/kubernetes.go b/scrapers/kubernetes/kubernetes.go index 7b2fd64c..2a95b7cb 100644 --- a/scrapers/kubernetes/kubernetes.go +++ b/scrapers/kubernetes/kubernetes.go @@ -409,9 +409,9 @@ func ExtractResults(ctx api.ScrapeContext, config v1.Kubernetes, objs []*unstruc if address.TargetRef != nil { if address.TargetRef.Kind != "Service" { relationships = append(relationships, v1.RelationshipResult{ - ConfigID: string(address.TargetRef.UID), - RelatedExternalID: v1.ExternalID{ExternalID: []string{getKubernetesAlias("Service", obj.GetNamespace(), obj.GetName())}, ConfigType: ConfigTypePrefix + "Service"}, - Relationship: fmt.Sprintf("%sService", address.TargetRef.Kind), + ConfigExternalID: v1.ExternalID{ExternalID: []string{getKubernetesAlias("Service", obj.GetNamespace(), obj.GetName())}, ConfigType: ConfigTypePrefix + "Service"}, + RelatedConfigID: string(address.TargetRef.UID), + Relationship: fmt.Sprintf("Service%s", address.TargetRef.Kind), }) } }