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

[k8sprocessor] implicit dependencies between owner metadata #512

Closed
andrzej-stencel opened this issue Mar 31, 2022 · 0 comments · Fixed by #513
Closed

[k8sprocessor] implicit dependencies between owner metadata #512

andrzej-stencel opened this issue Mar 31, 2022 · 0 comments · Fixed by #513

Comments

@andrzej-stencel
Copy link
Contributor

OT distro version: 0.0.57-beta.0

Steps to reproduce

  1. Configure k8s_tagger processor with owner_lookup_enabled: true and with extract metadata section that includes deploumentName but does not include replicaSetName, and with cronJobName but without jobName.
processors:
  k8s_tagger:
    owner_lookup_enabled: true
    extract:
      metadata:
       - deploymentName
       - cronJobName
  1. Prepare a Kubernetes cluster that includes a Deployment and a CronJob.
  2. Run the collector in a Kubernetes cluster with log and/or metrics collection from pods, observe the metadata on the logs and/or metrics.

Actual result

  • Data from pods that belong to a Deployment is not tagged with deployment name
  • Data from pods that belong to a CronJob is not tagged with the cronjob's name

Expected result

  • Data from pods that belong to a Deployment is tagged with deployment name k8s.deployment.name
  • Data from pods that belong to a CronJob is tagged with the cronjob's name k8s.cronjob.name

How to fix

This is because the Pods that belong to a Deployment actually belong to a ReplicaSet, and that ReplicaSet belongs to the Deployment. With the above configuration, currently the ReplicaSet information is not retrieved from k8s API server, which it should be when the Deployment extraction is defined.

Same with CronJob - Job - Pod hierarchy.

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 a pull request may close this issue.

1 participant