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 6, 2024
1 parent 218ff33 commit 1319177
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 @@ -520,6 +520,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 1319177

Please sign in to comment.