Skip to content

kube_cronjob_next_schedule_time in the past when cronjob timezone specified #2206

@paulclark222

Description

@paulclark222

What happened:
Defined a timezone for a cronjob:
timeZone: "Europe/London"
Now kube_cronjob_next_schedule_time is always returning the last schedule time rather than the next one.

What you expected to happen:
kube_cronjob_next_schedule_time should be the next scheduled time.

How to reproduce it (as minimally and precisely as possible):
Define a cronjob with non-UTC timezone (may only happen on zones east of UTC). Wait for the job to execute and then check kube_cronjob_next_schedule_time - you will see it's in the past.

  • kube-state-metrics version: 2.10
  • Kubernetes version (use kubectl version): 1.27
  • Cloud provider or hardware configuration: Azure AKS

Metadata

Metadata

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.kind/featureCategorizes issue or PR as related to a new feature.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions