Skip to content

Commit

Permalink
fix: endpoints parent should be the service
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Dec 9, 2024
1 parent 1597e08 commit 6b3657c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scrapers/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,13 @@ func getKubernetesParent(ctx *KubernetesContext, obj *unstructured.Unstructured)

allParents = append(ParentLookupHooks(ctx, obj), allParents...)

if obj.GetKind() == "Endpoints" {
allParents = append([]v1.ConfigExternalKey{{
Type: ConfigTypePrefix + "Service",
ExternalID: alias("Service", obj.GetNamespace(), obj.GetName()),
}}, allParents...)
}

return allParents
}

Expand Down

0 comments on commit 6b3657c

Please sign in to comment.