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] add CronJob name attribute #13214

Merged
merged 2 commits into from
Aug 18, 2022

Conversation

povilasv
Copy link
Contributor

Description:

Adding support for discovering K8S CronJob name attribute

Link to tracking Issue:

Ref #141

Testing:

  • unit tests

Documentation:

Updated go docs

@povilasv povilasv force-pushed the k8sattributes-cronjob branch from 44182fc to 4f0ba36 Compare August 11, 2022 07:09
@povilasv povilasv marked this pull request as ready for review August 11, 2022 07:43
@povilasv povilasv requested a review from a team August 11, 2022 07:43
@povilasv povilasv requested a review from dmitryax as a code owner August 11, 2022 07:43
@povilasv povilasv force-pushed the k8sattributes-cronjob branch 2 times, most recently from d8fd00c to 880519c Compare August 12, 2022 09:09
@povilasv
Copy link
Contributor Author

povilasv commented Aug 12, 2022

@dmitryax thanks for review, it's ready for another round :)

FYI I've looked up how K8s creates job names this is the code -> https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cronjob/cronjob_controllerv2.go#L640-L642

Also, I've looked at an example CronJob and these are the patterns:

CronJob Name: es-mgmt-snapshots
Job Name: es-mgmt-snapshots-27669360
Pod Name: es-mgmt-snapshots-27669360-r8w76

@povilasv povilasv requested a review from dmitryax August 12, 2022 09:11
@povilasv povilasv force-pushed the k8sattributes-cronjob branch from 880519c to 757afae Compare August 12, 2022 09:35
Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

Just one nit. Otherwise LGTM

processor/k8sattributesprocessor/internal/kube/client.go Outdated Show resolved Hide resolved
@povilasv povilasv force-pushed the k8sattributes-cronjob branch from 3da70bc to d961913 Compare August 17, 2022 06:59
@dmitryax dmitryax added the ready to merge Code review completed; ready to merge by maintainers label Aug 17, 2022
@dmitryax dmitryax merged commit 0afd5a1 into open-telemetry:main Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants