-
Notifications
You must be signed in to change notification settings - Fork 313
feat: Support setting run --interval via env variable.
#1107
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
Conversation
|
Checks fail because they still use [email protected] which doesn't have updated |
| value is `2m0s`. | ||
|
|
||
| Can also be set using the *IMAGE_UPDATER_INTERVAL* environment variable. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should descriibe the order the precedence here: if the param is not set, then check the env var, and if neither the param or env var is set, then fall back to the default value 2m.
| duration, err := time.ParseDuration(val) | ||
| if err == nil { | ||
| return duration | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should log a warning for invalid value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, please see #1110
We can separate registry-scanner changs into a separate PR, and once it is merged, change image-updater go.mod to reference a psudo-version of registry-scanner pointing to the commit sha of the first PR. |
Separate PR: #1110 |
This commit introduces new env variable `IMAGE_UPDATER_INTERVAL` for `run --interval` option. It will make it easier for users to configure update cycles, along with many other parameters that can already be set via either environment variable or command line arguments. Closes: argoproj-labs#1076 Signed-off-by: Denis Karpelevich <[email protected]>
Signed-off-by: Denis Karpelevich <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1107 +/- ##
=======================================
Coverage 63.49% 63.49%
=======================================
Files 15 15
Lines 2326 2326
=======================================
Hits 1477 1477
Misses 758 758
Partials 91 91 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This commit introduces new env variable
IMAGE_UPDATER_INTERVALforrun --intervaloption. It will make it easier for users to configure update cycles, along with many other parameters that can already be set via either environment variable or command line arguments.Closes: #1076