Commit Graph

458 Commits

Author SHA1 Message Date
Yuki Iwai
551931c6a8 Graduate the JobSuccessPolicy to beta
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-07-23 09:29:06 +09:00
Yuki Iwai
6e8dc2c250 Job: Extend the jobs_finished_total metric reason label with SuccessPolicy and CompletionsReached
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-07-23 09:29:02 +09:00
Yuki Iwai
594490fd77 Job: Add the CompletionsReached reason to the SuccessCriteriaMet condition
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-07-22 21:24:52 +09:00
googs1025
6626b9ce28 chore(Job): remove deprecated fake.NewSimpleClientset method 2024-07-19 23:46:29 +08:00
googs1025
75a4cfbd58 chore(Job): use ctx.Done() instead of stopCh 2024-07-19 23:43:36 +08:00
googs1025
af5b8bed70 chore(Job): use WaitForCacheSync method after sharedInformerFactory Start 2024-07-19 23:41:20 +08:00
Michal Wozniak
1be4df6e02 Cleanup Job controller isPodFailed function 2024-07-18 09:08:23 +02:00
carlory
dae05f3b88 cleanup after JobPodFailurePolicy is promoted to GA 2024-07-18 10:00:56 +08:00
Kubernetes Prow Robot
5d40866fae Merge pull request #125994 from carlory/fix-job-api
clean up codes after PodDisruptionConditions was promoted to GA
2024-07-17 14:37:09 -07:00
Michal Wozniak
370631eb30 Update the set of reasons in comment for JobFinishedNum metric 2024-07-16 12:34:29 +02:00
Michal Wozniak
f1233ac5e0 JobPodFailurePolicy to GA
# Conflicts:
#	pkg/controller/job/job_controller_test.go
2024-07-12 17:21:32 +02:00
Michal Wozniak
fb7704ba03 Delay setting terminal Job conditions until all pods are terminal
Fix the integration test typecheck

Fix after rebase

# Conflicts:
#	pkg/controller/job/job_controller_test.go
2024-07-11 20:54:09 +02:00
Tomas Tormo
5a046a4fd9 job_controller: Add test for SuccessCriteriaMet=False 2024-07-11 12:08:43 +00:00
carlory
850bc09e9b clean up codes after PodDisruptionConditions was promoted to GA and locked to default 2024-07-11 10:40:21 +08:00
Kubernetes Prow Robot
135f2e0372 Merge pull request #125997 from mimowo/job-comment-cleanup
Cleanup TODO comment in the Job controller
2024-07-10 12:15:39 -07:00
Michal Wozniak
8a8717c3a9 Cleanup TODO comment in the Job controller 2024-07-10 12:27:56 +02:00
Tomas Tormo
2aed11ec78 job_controller: Ignore FailureTarget!=True 2024-07-10 08:02:14 +00:00
Kubernetes Prow Robot
4a214f6ad9 Merge pull request #125461 from mimowo/pod-disruption-conditions-ga
Graduate PodDisruptionConditions to stable
2024-07-09 11:08:13 -07:00
Michal Wozniak
4250d444f8 Cleanup Job controller tests 2024-07-05 14:59:03 +02:00
Stephen Kitt
f55b59fc02 pkg/controller: drop pointer wrapper functions
The new k8s.io/utils/ptr package provides generic wrapper functions,
which can be used instead of type-specific pointer wrapper functions.
This replaces the latter with the former, and migrates other uses of
the deprecated pointer package to ptr in affected files.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-07-02 16:19:12 +02:00
Michal Wozniak
780191bea6 review remarks for graduating PodDisruptionConditions 2024-06-28 17:32:27 +02:00
Michal Wozniak
bf0c9885a4 Graduate PodDisruptionConditions to stable 2024-06-28 16:36:51 +02:00
Michal Wozniak
7b5d3f5bc1 Assert on all conditions in the Pod Failure policy tests 2024-06-21 15:42:14 +02:00
Dejan Zele Pejchev
11b6e4c404 count ready pods when deleting active pods for failed jobs 2024-06-21 01:07:40 +02:00
Kubernetes Prow Robot
cc2946e5d1 Merge pull request #125515 from mimowo/refactor-terminating-counter
Refactor tracking of terminating pods in Job controller
2024-06-20 13:01:41 -07:00
Michal Wozniak
c12bcf4e94 Refactor enactJobFinished util function for Job controller 2024-06-20 13:02:54 +02:00
Michal Wozniak
8cec2c7470 Refactor tracking of terminating pods in Job controller 2024-06-20 09:35:56 +02:00
Kubernetes Prow Robot
bd88faee8b Merge pull request #125520 from mimowo/cleanup-success-policy-check
Remove redundant check in Job success policy code
2024-06-18 12:40:09 -07:00
Michal Wozniak
7a3d73d234 Remove redundant check in Job success policy code 2024-06-14 19:59:40 +02:00
Michal Wozniak
18a14bcff9 Remove unused parameter in Job controller function 2024-06-14 19:43:19 +02:00
Yuki Iwai
be3316e2e1 Job: Fix a bug that the SuccessCriteriaMet condition is added to the Job with successPolicy even if the JobSuccessPolicy featureGate is disabled
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-06-12 00:36:36 +09:00
Kubernetes Prow Robot
c49b140c45 Merge pull request #125175 from dejanzele/feat/count-terminating-for-failed-jobs
Count terminating pods when deleting active pods for failed jobs
2024-06-10 16:56:37 -07:00
Kubernetes Prow Robot
cfd949e321 Merge pull request #124942 from AxeZhan/getFinishTimeFromContainers
[Sidecar Containers] Sidecar containers finish time needs to be accounted for in job controller
2024-06-06 12:23:05 -07:00
Dejan Pejchev
01536f5a84 add additional tests to make sure job controller logic is correct when counting terminating pods with enabled and disabled PodReplacementPolicy feature 2024-06-06 11:40:54 +02:00
AxeZhan
d97282052e check sidecar featuregate in getFinishedTime 2024-06-06 15:46:41 +08:00
Dejan Pejchev
7dd2948620 count terminating pods when deleting active pods for failed jobs 2024-06-04 11:31:00 +02:00
Tomas Tormo
ce56b2ca58 Remove JobReadyPods feature flag 2024-05-27 13:09:52 +00:00
AxeZhan
3a2a500182 check restartpolicy in getFinishTimeFromContainers 2024-05-21 11:58:06 +08:00
AxeZhan
e4348a1210 consider sidecar containers in getFinishTimeFromContainers 2024-05-20 18:31:23 +08:00
Michal Wozniak
a6c9d5ba00 Do not remove Job's finalizer from Pod owned by a non-batch/v1 Job 2024-05-14 17:29:23 +02:00
Kubernetes Prow Robot
d2e6c51b05 Merge pull request #123537 from kaisoz/commonize-job-util-functions
Add the util pkg to commonize job util functions
2024-05-07 16:59:28 -07:00
Tomas Tormo
c856c412b9 Add util pkg to commonize job util functions 2024-05-07 09:27:46 +00:00
Alvaro Aleman
6d0ac8c561 Use the generic/typed workqueue throughout
This change makes us use the generic workqueue throughout the project in
order to improve type safety and readability of the code.
2024-05-04 14:33:12 -04:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
Hiroki Takatsuka
84ffc2fc3d fix(job_controller): add delay duration to log message when enqueueing job 2024-04-07 16:42:48 +09:00
Yuki Iwai
f2508df279 Job: Use the fake clock in TestTrackJobStatusAndRemoveFinalizers
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-03-09 06:09:05 +09:00
Yuki Iwai
e216742672 Job: Support for the JobSuccessPolicy (alpha)
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-03-08 05:49:09 +09:00
Michał Woźniak
e568a77a93 Support for the Job managedBy field (alpha) (#123273)
* support for the managed-by label in Job

* Use managedBy field instead of managed-by label

* Additional review remarks

* Review remarks 2

* review remarks 3

* Skip cleanup of finalizers for job with custom managedBy

* Drop the performance optimization

* imrpove logs
2024-03-05 09:25:15 -08:00
Kubernetes Prow Robot
df366107d1 Merge pull request #123529 from thockin/go-workspaces
Go workspaces for k/k and k/staging/*
2024-03-01 08:43:03 -08:00
Tim Hockin
6dbc754ed6 Retool typecheck to be simpler
Instead of walking paths ourselves, just let Go's packages library do
it.  This is a slight CLI change - it wants "./foo" rather than "foo".

This also flagged a few things which seem to be legit failures.
2024-02-29 22:07:00 -08:00