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

Cronjob status.lastSuccessfulTime not populated by a manually triggered job via kubernetes dashboard #9805

Open
anujpatel2809 opened this issue Dec 17, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@anujpatel2809
Copy link

anujpatel2809 commented Dec 17, 2024

What happened?

I trigger the cronjob by manually via kubernetes dashboard and this jobs ends successfully. However status.lastSuccessfulTime is not updated, thus making it difficult to monitor failed cronjobs.

Same issue was fixed for kubectl command via kubernetes/kubernetes#118276 but it's still open for dashboards

What did you expect to happen?

status.lastSuccessfulTime should be updated with a timestamp of the succeeded job endTime

How can we reproduce it (as minimally and precisely as possible)?

Install the attached files:

kubectl apply -f configmap-ok.yaml
kubectl apply -f cronjob_test.yaml

Wait until cronjob has actually trigged, test with

kubectl get cronjob -o jsonpath='{.items[*].status}' | jq

to see that lastScheduleTime and lastSuccessfulTime are populated ok (as expected).
Then apply the fail config-map, now the job will not complete OK:

kubectl apply -f configmap-fail.yaml

Again wait until cronjob has trigged automatically, observe

kubectl get cronjob -o jsonpath='{.items[*].status}' | jq

to see that lastScheduleTime is updated but lastSuccessfulTime is not.

Then apply the "OK" configmap and then create the job manulay via k8s dashboard

when the job has finished and completed ok, observe that lastSuccessfulTime is still not updated.

kubectl get cronjob -o jsonpath='{.items[*].status}'

Wait until next schedule and observe that the field is now updated.

cronjob_test.txt
configmap-fail.txt
configmap-ok.txt

Anything else we need to know?

No response

What browsers are you seeing the problem on?

Chrome

Kubernetes Dashboard version

7.5.0

Kubernetes version

Client Version: v1.30.5 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.11

Dev environment

No response

@anujpatel2809 anujpatel2809 added the kind/bug Categorizes issue or PR as related to a bug. label Dec 17, 2024
@anujpatel2809
Copy link
Author

Updates - Kubernetes dashboard version is 7.5.0. 1.4.0 is web-ui version

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

No branches or pull requests

1 participant