mirror of
https://github.com/crazy-max/diun.git
synced 2026-01-04 03:55:00 +01:00
Jitter watch option
This commit is contained in:
@@ -32,6 +32,7 @@ You can override this using the [`--config` flag or `CONFIG` env var with `serve
|
||||
watch:
|
||||
workers: 10
|
||||
schedule: "0 */6 * * *"
|
||||
jitter: 30s
|
||||
firstCheckNotif: false
|
||||
|
||||
notif:
|
||||
@@ -121,6 +122,7 @@ All configuration from file can be transposed into environment variables. As an
|
||||
watch:
|
||||
workers: 10
|
||||
schedule: "0 */6 * * *"
|
||||
jitter: 30s
|
||||
firstCheckNotif: false
|
||||
|
||||
notif:
|
||||
@@ -169,6 +171,7 @@ Can be transposed to:
|
||||
|
||||
DIUN_WATCH_WORKERS=10
|
||||
DIUN_WATCH_SCHEDULE=0 */6 * * *
|
||||
DIUN_WATCH_JITTER=30s
|
||||
DIUN_WATCH_FIRSTCHECKNOTIF=false
|
||||
|
||||
DIUN_NOTIF_GOTIFY_ENDPOINT=http://gotify.foo.com
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
watch:
|
||||
workers: 10
|
||||
schedule: "0 */6 * * *"
|
||||
jitter: 30s
|
||||
firstCheckNotif: false
|
||||
compareDigest: true
|
||||
healthchecks:
|
||||
@@ -44,6 +45,24 @@ Maximum number of workers that will execute tasks concurrently. (default `10`)
|
||||
!!! abstract "Environment variables"
|
||||
* `DIUN_WATCH_SCHEDULE`
|
||||
|
||||
### `jitter`
|
||||
|
||||
Enable time jitter. Prior to executing of a job, cron will sleep a random
|
||||
duration in the range from 0 to _jitter_. (default `30s`)
|
||||
|
||||
!!! note
|
||||
Only works with `schedule` setting. `0` disables time jitter.
|
||||
|
||||
!!! example "Config file"
|
||||
```yaml
|
||||
watch:
|
||||
schedule: "0 */6 * * *"
|
||||
jitter: 30s
|
||||
```
|
||||
|
||||
!!! abstract "Environment variables"
|
||||
* `DIUN_WATCH_JITTER`
|
||||
|
||||
### `firstCheckNotif`
|
||||
|
||||
Send notification at the very first analysis of an image. (default `false`)
|
||||
|
||||
@@ -60,6 +60,7 @@ services:
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_DOCKER=true"
|
||||
labels:
|
||||
- "diun.enable=true"
|
||||
@@ -82,6 +83,7 @@ docker run -d --name diun \
|
||||
-e "LOG_JSON=false" \
|
||||
-e "DIUN_WATCH_WORKERS=20" \
|
||||
-e "DIUN_WATCH_SCHEDULE=0 */6 * * *" \
|
||||
-e "DIUN_WATCH_JITTER=30s" \
|
||||
-e "DIUN_PROVIDERS_DOCKER=true" \
|
||||
-v "$(pwd)/data:/data" \
|
||||
-v "/var/run/docker.sock:/var/run/docker.sock" \
|
||||
@@ -153,6 +155,7 @@ services:
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_DOCKER=true"
|
||||
labels:
|
||||
- "diun.enable=true"
|
||||
|
||||
@@ -31,6 +31,7 @@ services:
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_DOCKER=true"
|
||||
restart: always
|
||||
|
||||
|
||||
@@ -82,6 +82,8 @@ spec:
|
||||
value: "20"
|
||||
- name: DIUN_WATCH_SCHEDULE
|
||||
value: "0 */6 * * *"
|
||||
- name: DIUN_WATCH_JITTER
|
||||
value: "30s"
|
||||
- name: DIUN_PROVIDERS_KUBERNETES
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
|
||||
@@ -30,6 +30,7 @@ services:
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_SWARM=true"
|
||||
deploy:
|
||||
mode: replicated
|
||||
|
||||
@@ -23,6 +23,7 @@ services:
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_DOCKER=true"
|
||||
- "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
|
||||
restart: always
|
||||
|
||||
@@ -28,6 +28,7 @@ services:
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_DOCKER=true"
|
||||
- "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
|
||||
- "DIUN_PROVIDERS_FILE_FILENAME=/custom-images.yml"
|
||||
|
||||
Reference in New Issue
Block a user