Skip to content

Commit

Permalink
chore: fix direction for service relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Jul 16, 2024
1 parent d308882 commit 9bcf5c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scrapers/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}
}
Expand Down

0 comments on commit 9bcf5c1

Please sign in to comment.