Skip to content

Commit

Permalink
Merge pull request #308 from flanksource/ns-in-scrape
Browse files Browse the repository at this point in the history
fix: copy namespace from scrape result to config item
  • Loading branch information
moshloop authored Nov 2, 2023
2 parents bcf921e + 8bdf5c0 commit 446af9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions db/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func NewConfigItemFromResult(result v1.ScrapeResult) (*models.ConfigItem, error)
ConfigClass: result.ConfigClass,
Type: &result.Type,
Name: &result.Name,
Namespace: &result.Namespace,
Source: &result.Source,
Tags: &result.Tags,
Config: &dataStr,
Expand Down
7 changes: 7 additions & 0 deletions fixtures/expected/file-git.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
"display": {
"template": "code={{.code}}, age={{.sslAge}}"
}
},
{
"name": "http-headers",
"test": {
"expr": "json.headers[\"User-Agent\"].startsWith(\"canary-checker/\")"
},
"url": "https://httpbin.demo.aws.flanksource.com/headers"
}
]
}
Expand Down

0 comments on commit 446af9a

Please sign in to comment.