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

Adding resourceVersion to CronJob metrics? #1433

Closed
JensErat opened this issue Mar 29, 2021 · 1 comment · Fixed by #1447
Closed

Adding resourceVersion to CronJob metrics? #1433

JensErat opened this issue Mar 29, 2021 · 1 comment · Fixed by #1447
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@JensErat
Copy link
Contributor

What would you like to be added:

For deployments we already have a generation metric, which helps to see whether a deployment changed. We do not have such a metric for CronJobs -- they don't have such metadata at all. We could export the resourceVersion metadata as label though, similar to what ConfigMaps, Secrets and Ingress resources have.

Why is this needed:

#500 was closed due to being inactive, but is still an issue. We have an alert that notifies us whenever the calculated CronJob start date passed. Something like and changes(kube_cronjob_metadata_resource_version[24h]) would help to mitigate the issue.

Describe the solution you'd like

Mostly copy-paste the solution from configmaps.

Additional context

I'm fine with providing the code, if we have agreement on this being a good thing to have.

Jens Erat jens.erat@daimler.com, Daimler TSS GmbH, imprint

@JensErat JensErat added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 29, 2021
@lilic
Copy link
Member

lilic commented Mar 30, 2021

👋 Thanks for the feature request! Exporting the resource version sounds good to me as we have it for other resources anyways. There is also kube_cronjob_status_active, but have not had a chance to see if that would possibly work?

cc @brancz as you commented on the last issue referenced here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants