Commit Graph

55 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
fdbb960354
Merge pull request #90934 from iobuf/cronjob
CronJob: cleanup legacy ScheduledJob vars,docs
2020-05-19 20:35:11 -07:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Zhou Peng
b33e202397 CronJob: cleanup legacy ScheduledJob vars,docs
Signed-off-by: Zhou Peng <p@ctriple.cn>
2020-05-10 00:45:21 +08:00
taesun_lee
79680b5d9b Fix pkg/controller typos in some error messages, comments etc
- applied review results by LuisSanchez
- Co-Authored-By: Luis Sanchez <sanchezl@redhat.com>

genernal -> general
iniital -> initial
initalObjects -> initialObjects
intentionaly -> intentionally
inforer -> informer
anotother -> another
triger -> trigger
mutli -> multi
Verifyies -> Verifies
valume -> volume
unexpect -> unexpected
unfulfiled -> unfulfilled
implenets -> implements
assignement -> assignment
expectataions -> expectations
nexpected -> unexpected
boundSatsified -> boundSatisfied
externel -> external
calcuates -> calculates
workes -> workers
unitialized -> uninitialized
afater -> after
Espected -> Expected
nodeMontiorGracePeriod -> NodeMonitorGracePeriod
estimateGrracefulTermination -> estimateGracefulTermination
secondrary -> secondary
ShouldRunDaemonPodOnUnscheduableNode -> ShouldRunDaemonPodOnUnschedulableNode
rrror -> error
expectatitons -> expectations
foud -> found
epackage -> package
succesfulJobs -> successfulJobs
namesapce -> namespace
ConfigMapResynce -> ConfigMapResync
2020-02-27 00:15:33 +09:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Clayton Coleman
c6e34e58c5
job: Ignore namespace termination errors when creating pods or jobs
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. While we could technically
exit the entire processing loop early for very large jobs,
we should wait for more evidence that is an issue before changing
that logic substantially.
2019-10-20 18:39:01 -04:00
Yassine TIJANI
c1487840bc move util/metrics to component-base
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-08 14:42:31 +02:00
liucimin
f68b12e4ec fix the metainternalversion.List change error 2019-05-07 10:35:04 +08:00
Maciej Szulik
edb3357a29
Rename CronJob controller file 2019-04-25 12:19:29 +02:00
Peter McAlpine
6518c0b696 Rename: cronjob_controller[_test].go -> controller[_test].go
This change renames these source files to reduce stuttering when reading
the path.
2019-03-19 14:36:26 -04:00
Jingyi Hu
1bdbc35994 controller: use pagination in cronjob controller
Use pagination (chunking) when listing Jobs and CronJobs in cronjob
controller.
2019-02-01 14:02:14 -08:00
juanvallejo
9f1cc8571e
defer finalizing pods for cronjobs to server delete 2018-11-12 10:13:48 -05:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Abhishek Kumar Singh
392bf0adef
Typo Fix.
Fixed minor spelling mistakes caught while reading `cronjob_controller.go` source code reference at [operating-kubernetes](https://stripe.com/blog/operating-kubernetes)
2018-06-29 11:04:10 +05:30
Kubernetes Submit Queue
72a24128d5
Merge pull request #62011 from hanxiaoshuai/fixtodo0402
Automatic merge from submit-queue (batch tested with PRs 60102, 59970, 60021, 62011, 62080). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixtodo:generate an event for a missed starting window

**What this PR does / why we need it**:
fixtodo:generate an event for a missed starting window
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-05 18:47:07 -07:00
hangaoshuai
eb75a3303a fixtodo:generate an event for a missed starting window 2018-04-04 09:26:08 +08:00
Mikhail Mazurskiy
468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Kubernetes Submit Queue
60836d0d37
Merge pull request #59471 from dmathieu/remove-cronjob-from-client
Automatic merge from submit-queue (batch tested with PRs 60632, 60806, 59471, 61251, 61013). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove method NewCronJobControllerFromClient

**What this PR does / why we need it**:

This method was originally introduced when cronjob was still called scheduledjob: 7a34347f7f
Back then, both init methods had different signatures.

Since the rename to cronjob (41d88d30dd), this method is an alias to the normal initializer, have the same signature and is not used anywhere in the codebase.

Since this method was never actually used for cronjobs, it doesn't seem removing it would need any deprecation notice.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:


```release-note
Remove never used NewCronJobControllerFromClient method
```
2018-03-21 16:01:16 -07:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
dmathieu
6bd0a7d6a9 remove method NewCronJobControllerFromClient
This method was originally introduced when cronjob was still called
scheduledjob:
7a34347f7f
Back then, both init methods had different signatures.

Since the rename to cronjob
(41d88d30dd),
this method is an alias to the normal initializer, have the same
signature and is not used anywhere in the codebase.

Since this method was never actually used for cronjobs, it doesn't seem
removing it would need any deprecation notice.
2018-02-07 09:48:11 +01:00
Ferran Rodenas
d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Maciej Szulik
6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
Kubernetes Submit Queue
fc9e214a84 Merge pull request #51519 from hzxuzhonghu/cronjob
Automatic merge from submit-queue

update deprecated interface and fix bug not return when list pod failed in cronjob_controller.go

**What this PR does / why we need it**:
remove some unused redundant code, and fix bug: when list pod failed, 
job still deleted but pod may still exist  in func `deleteJob`

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-02 12:58:07 -07:00
Antoine Pelisse
d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
hzxuzhonghu
b80a8db6d3 update Deprecated code and fix bug not return when list pod failed 2017-08-31 14:14:51 +08:00
Maciej Szulik
2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
supereagle
adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Dr. Stefan Schimanski
5925a0a1df Move pkg/api/v1/ref -> client-go/tools/reference 2017-07-18 22:45:43 +02:00
Chao Xu
9d489c8504 manual changes 2017-07-17 15:05:38 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Jun Xiang Tee
ae4df9f573 deprecate created-by annotation for cronjob 2017-06-23 11:05:40 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu
cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
zhangxiaoyu-zidif
6918109b31 Fix for-loop and err definition 2017-05-31 13:51:14 +08:00
Anthony Yeh
1e14323ac2 CronJob: List children before parents.
This prevents a race with the GC while it orphans dependents.
2017-04-19 15:42:34 -07:00
Anthony Yeh
e085f1f83c CronJob: Apply missing ControllerRefs to Jobs created by a CronJob.
This should only happen if the Jobs were created by an older version
of the CronJob controller, since from now on we add ControllerRef upon
creation.

CronJob doesn't do actual adoption because it doesn't use label
selectors to find its Jobs. However, we should apply ControllerRef
for potential server-side cascading deletion, and to advise other
controllers we own these objects.
2017-04-18 14:00:18 -07:00
Anthony Yeh
d72eebd3fc CronJob: Add ControllerRef on all created Jobs. 2017-04-18 13:59:54 -07:00
Anthony Yeh
4c954d6dbb CronJob: Don't launch if DeletionTimestamp is set. 2017-04-18 13:59:31 -07:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
xujun
e626e45b4d Remove unused argument of 'groupJobsByParent' function in cronjob controller. 2017-03-20 12:43:10 -04:00
Maciej Szulik
7cba9d9c92 Issue 37166: remove everything from batch/v2alpha1 that is not new 2017-03-06 12:12:38 +01:00
peay
2b33de0684 Modify CronJob API to add job history limits, cleanup jobs in controller 2017-02-25 06:51:54 -05:00
Janet Kuo
6753544949 Fix cronjob panic on status update failure 2017-02-17 11:29:39 -08:00
deads2k
8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Clayton Coleman
245b592fac
Convert core code to metav1.ListOptions 2017-01-23 17:52:45 -05:00
peay
6b5c8f1d2f Emit warning when CronJob cannot determine starting time 2017-01-18 15:33:32 -05:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00