Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parent id of Namespace & Cluster in incremental k8s scraper #588

Merged
merged 1 commit into from
May 24, 2024

Conversation

adityathebe
Copy link
Member

@adityathebe adityathebe commented May 23, 2024

resolves: #585

In an incremental scraper, we don't have the namespace object. Hence, resourceIDMap would be empty for all the namespaces.
If any namespaced object, like a Deployment, were to be scraped by the incremental scraper, we wouldn't be able to set the parent of that deployment because we don't know the id of the parent namespace.

In the workload cluster, the incremental scraper wasn't able to set the parent for a newly created cronjob so the saving of CronJob config failed. Consequently, saving of the job and also the pod would fail. This would happen until a full scrape.

The fix: use the Namespace config alias as the parent's external id.

@adityathebe adityathebe marked this pull request as draft May 23, 2024 16:26
@adityathebe adityathebe force-pushed the fix/parent-id-in-incremental-scraper branch 4 times, most recently from b09584c to 6a2e599 Compare May 23, 2024 16:38
In an incremental scraper, we don't have the namespace object. Hence, resourceIDMap would be empty for all the namespaces.
If any namespaced object, like a Deployment, were to be scraped by the incremental scraper, we wouldn't be able to set the parent of that deployment because we don't know the id of the parent namespace.

In the workload cluster, the incremental scraper wasn't able to set the parent for a newly created cronjob so the saving of CronJob config failed. Consequently, saving of the job and also the pod would fail. This would happen until a full scrape.
@adityathebe adityathebe force-pushed the fix/parent-id-in-incremental-scraper branch from 6a2e599 to 550679d Compare May 23, 2024 16:39
@adityathebe adityathebe marked this pull request as ready for review May 23, 2024 16:39
@adityathebe adityathebe requested a review from moshloop May 23, 2024 16:40
@moshloop moshloop merged commit 3e55225 into main May 24, 2024
7 checks passed
@moshloop moshloop deleted the fix/parent-id-in-incremental-scraper branch May 24, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes watch scrape errors
2 participants