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

[processor/k8sattributes] Wait for ReplicaSet informer before starting pod informer #37138

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bacherfl
Copy link
Contributor

Description

This PR is an alternative approach to the previous fix made for #37056, which did not fully solve the issue of the deployment name not being added to a pod after the initial informer sync

Link to tracking issue

Fixes #37056

Testing

Re-enabled the flaky E2E test

@github-actions github-actions bot added the processor/k8sattributes k8s Attributes processor label Jan 10, 2025
// start the replicaSet informer first, as the replica sets need to be
// present at the time the pods are handled, to correctly establish the connection between pods and deployments
if c.Rules.DeploymentName || c.Rules.DeploymentUID {
waitForReplicaSets = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for the ReplicaSet informer to sync before allowing Pod informer to sync make sense.

Should we consider waiting for other resources too before unblocking the Pod's sync?

I wonder if it is just cleaner to start all the informers in parallel except of the Pod informer, wait for them to sync and then start the Pod informer eventually ensuring that all the dependencies are in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/k8sattributes k8s Attributes processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus metrics missing k8s_deployment_name attribute for short period after agent restart
2 participants