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

feat: Add periodic job support #1474

Closed
wants to merge 61 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
44074c2
Add periodics controller
dippynark Sep 18, 2022
ee32402
Improve comments
dippynark Sep 18, 2022
a7cca17
Add comments to reconiliation logic
dippynark Sep 18, 2022
2783e6a
Add a
dippynark Sep 18, 2022
89bd2ec
Rename to strobe
dippynark Sep 18, 2022
086be29
Merge branch 'main' into add-periodics-controller
dippynark Sep 24, 2022
098567b
Implement reconciliation and update docs
dippynark Sep 25, 2022
f954770
Merge branch 'main' into add-periodics-controller
dippynark Sep 25, 2022
40472e3
Implement maximum concurrency
dippynark Sep 25, 2022
9160b1f
Update docs
dippynark Sep 25, 2022
c45ca3b
Update Helm chart
dippynark Sep 25, 2022
b2b7532
Add strobe Docker build
dippynark Sep 25, 2022
11c7c20
Fix indent
dippynark Sep 25, 2022
36ebbf0
Fix RBAC
dippynark Sep 25, 2022
17bca56
Fix spelling
dippynark Sep 25, 2022
af48ed3
Add release build
dippynark Sep 25, 2022
03c89e9
Update docs
dippynark Sep 25, 2022
d32e121
Check for nil
dippynark Sep 25, 2022
ecb22d3
Remove print
dippynark Sep 25, 2022
9e4813f
Add comment
dippynark Sep 25, 2022
281bcac
Use UTC time
dippynark Sep 25, 2022
173ecb5
Use periodicJobFirstObserved
dippynark Sep 25, 2022
b894164
Improve ordering and comments
dippynark Sep 25, 2022
222fd39
Improve comments
dippynark Sep 25, 2022
021aa21
Use NamespacedName
dippynark Sep 25, 2022
51b9f92
Fix earliestScheduleTime
dippynark Sep 25, 2022
75c58cb
Fix LighthouseJob generation and add tests
dippynark Sep 26, 2022
ffa809a
Reorder
dippynark Sep 26, 2022
d1db0d8
Add cron parse comment
dippynark Sep 27, 2022
a9c642c
Only enqueue jobs at next schedule time
dippynark Sep 27, 2022
b1e50ce
Check if job has already been triggered
dippynark Sep 28, 2022
7283ce9
Recover from downtime
dippynark Sep 28, 2022
3f54b19
Update docs
dippynark Sep 28, 2022
28d69d0
Update docs
dippynark Sep 28, 2022
30c4fda
Improve recovery comment
dippynark Sep 28, 2022
c745145
Improve recovery comment
dippynark Sep 28, 2022
252a2b8
Improve recovery comment
dippynark Sep 28, 2022
12c117f
Use 0
dippynark Sep 28, 2022
e59242f
Use >0
dippynark Sep 28, 2022
5400640
Merge branch 'main' into add-periodics-controller
dippynark Sep 28, 2022
8dca4b4
Use rolling update
dippynark Sep 28, 2022
8026c48
Use Unix time
dippynark Sep 28, 2022
a0c24ee
Print Unix time properly
dippynark Sep 28, 2022
d75422a
Improve time hashing and explanation
dippynark Sep 29, 2022
04d671c
Improve time hashing and explanation
dippynark Sep 29, 2022
d922423
Fix name suffix
dippynark Sep 29, 2022
59012ad
Improve lock explanation
dippynark Sep 29, 2022
3001c1b
Improve lock explanation
dippynark Sep 29, 2022
4897cb9
Add generateLighthouseJob test
dippynark Sep 29, 2022
0611afc
Add comment
dippynark Sep 29, 2022
17bf289
Use actualLighthouseJob
dippynark Sep 29, 2022
122752b
Fix test file name
dippynark Sep 29, 2022
454b8b4
Remove the
dippynark Sep 29, 2022
c0a2d13
Use common pipelineRunSpec
dippynark Sep 29, 2022
6826cd5
Merge branch 'main' into add-periodics-controller
dippynark Oct 7, 2022
d007a2e
Merge branch 'main' into add-periodics-controller
dippynark Oct 10, 2022
d463bb0
Merge branch 'main' into add-periodics-controller
dippynark Nov 25, 2022
9ca5a16
Merge branch 'main' into add-periodics-controller
dippynark Nov 25, 2022
27c7bdd
Merge branch 'main' into add-periodics-controller
dippynark Jan 11, 2023
e4adcf7
Merge branch 'main' into add-periodics-controller
dippynark May 13, 2023
29c0b9a
Merge branch 'main' into add-periodics-controller
dippynark Jan 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add cron parse comment
dippynark committed Sep 27, 2022
commit d1db0d82fc9524955dbe09a053ba4d559a5bcc11
5 changes: 4 additions & 1 deletion pkg/strobe/controller.go
Original file line number Diff line number Diff line change
@@ -175,7 +175,10 @@ func (c *LighthousePeriodicJobController) reconcile(req ctrl.Request) (reconcile
// Parse cron schedule
cron, err := cron.Parse(periodicJobConfig.Cron)
if err != nil {
c.logger.Info("Failed to parse cron schedule")
c.logger.WithError(err).Error("Failed to parse cron schedule")
// There is no point raising the error because we will still not be able
// to parse the cron schedule on retry. Instead, we wait for the
// operator to update the config with a valid cron
return reconcileAfter, nil
}
nextScheduleTime := cron.Next(now)