diff --git a/scrapers/aws/aws.go b/scrapers/aws/aws.go index 5e5e294e..1d6a78ae 100644 --- a/scrapers/aws/aws.go +++ b/scrapers/aws/aws.go @@ -1198,6 +1198,9 @@ func (aws Scraper) Scrape(ctx api.ScrapeContext) v1.ScrapeResults { Name: "account", Value: lo.FromPtr(awsCtx.Caller.Account), }) + + delete((*results)[i].Labels, "name") + delete((*results)[i].Labels, "Name") } allResults = append(allResults, *results...) diff --git a/scrapers/kubernetes/kubernetes.go b/scrapers/kubernetes/kubernetes.go index 34ad6685..bf2c8321 100644 --- a/scrapers/kubernetes/kubernetes.go +++ b/scrapers/kubernetes/kubernetes.go @@ -594,6 +594,13 @@ func cleanKubernetesObject(obj map[string]any) (map[string]any, error) { o.Delete("metadata", "annotations", "kubectl.kubernetes.io/last-applied-configuration") o.Delete("metadata", "managedFields") + o.Delete("metadata", "labels", "controller-uid") + o.Delete("metadata", "labels", "batch.kubernetes.io/job-name") + o.Delete("metadata", "labels", "job-name") + o.Delete("metadata", "labels", "batch.kubernetes.io/controller-uid") + o.Delete("metadata", "labels", "kubernetes.io/metadata.name") + o.Delete("metadata", "labels", "pod-template-generation") + o.Delete("status", "artifact", "lastUpdateTime") o.Delete("status", "observedGeneration") o.Delete("status", "lastTransitionTime")