Skip to content

Commit

Permalink
feat: save namespace of config scrapers
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed Nov 7, 2024
1 parent 97685c1 commit 7884863
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions db/config_scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ func PersistScrapeConfigFromCRD(ctx context.Context, scrapeConfig *v1.ScrapeConf
}

configScraper := models.ConfigScraper{
ID: uuid.MustParse(string(scrapeConfig.GetUID())),
Name: fmt.Sprintf("%s/%s", scrapeConfig.Namespace, scrapeConfig.Name),
Spec: spec,
Source: models.SourceCRD,
ID: uuid.MustParse(string(scrapeConfig.GetUID())),
Name: fmt.Sprintf("%s/%s", scrapeConfig.Namespace, scrapeConfig.Name),
Namespace: scrapeConfig.Namespace,
Spec: spec,
Source: models.SourceCRD,
}
tx := ctx.DB().Save(&configScraper)
return changed, tx.Error
Expand Down

0 comments on commit 7884863

Please sign in to comment.