Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
132 changes: 132 additions & 0 deletions docs/config/defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Defaults configuration

## Overview

Defaults allow specifying default values for any configuration that is
typically set at the image level using labels or annotations depending on the
provider. Any of them will take precedence or be merged over defaults.

```yaml
defaults:
watchRepo: false
notifyOn:
- new
- update
maxTags: 10
sortTags: reverse
includeTags:
- latest
excludeTags:
- dev
metadata:
foo: bar
```

## Configuration

### `watchRepo`

Watch all tags of this container image ([be careful](../faq.md#docker-hub-rate-limits)
with this setting). (default `false`)

!!! example "Config file"
```yaml
defaults:
watchRepo: false
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_WATCHREPO`

### `notifyOn`

List of status to be notified. Can be one of `new` or `update`.
(default `new,update`)

!!! example "Config file"
```yaml
defaults:
notifyOn:
- new
- update
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_NOTIFYON=new,update`

### `maxTags`

Maximum number of tags to watch. `0` means all of them. (default `0`)

!!! warning
Only works if watch repo is enabled.

!!! example "Config file"
```yaml
defaults:
maxTags: 10
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_MAXTAGS=10`

### `sortTags`

[Sort tags method](../faq.md#tags-sorting-when-using-watch_repo). Can be one of
`default`, `reverse`, `semver`, `lexicographical`. (default `reverse`)

!!! warning
Only works if watch repo is enabled.

!!! example "Config file"
```yaml
defaults:
sortTags: reverse
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_SORTTAGS=reverse`

### `includeTags`

List of regular expressions to include tags. Can be useful if watch repo is
enabled.

!!! example "Config file"
```yaml
defaults:
includeTags:
- ^\d+\.\d+\.\d+$
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_INCLUDETAGS=^\d+\.\d+\.\d+$`

### `excludeTags`

List of regular expressions to exclude tags. Can be useful if watch repo is
enabled.

!!! example "Config file"
```yaml
defaults:
excludeTags:
- dev
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_EXCLUDETAGS=dev`

### `metadata`

Additional metadata that can be used in [notification template](../faq.md#notification-template)

!!! example "Config file"
```yaml
defaults:
metadata:
foo: bar
```

!!! abstract "Environment variables"
* `DIUN_DEFAULTS_METADATA_FOO=bar`
19 changes: 19 additions & 0 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ You can override this using the [`--config` flag or `CONFIG` env var with `serve
firstCheckNotif: false
runOnStartup: true

defaults:
watchRepo: false
notifyOn:
- new
- update
sortTags: reverse

notif:
amqp:
host: localhost
Expand Down Expand Up @@ -132,6 +139,13 @@ All configuration from file can be transposed into environment variables. As an
firstCheckNotif: false
runOnStartup: true

defaults:
watchRepo: false
notifyOn:
- new
- update
sortTags: reverse

notif:
gotify:
endpoint: http://gotify.foo.com
Expand Down Expand Up @@ -187,6 +201,10 @@ Can be transposed to:
DIUN_WATCH_FIRSTCHECKNOTIF=false
DIUN_WATCH_RUNONSTARTUP=true

DIUN_DEFAULTS_WATCHREPO=false
DIUN_DEFAULTS_NOTIFYON=new,update
DIUN_DEFAULTS_SORTTAGS=reverse

DIUN_NOTIF_GOTIFY_ENDPOINT=http://gotify.foo.com
DIUN_NOTIF_GOTIFY_TOKEN=Token123456
DIUN_NOTIF_GOTIFY_PRIORITY=1
Expand Down Expand Up @@ -224,6 +242,7 @@ Can be transposed to:

* [db](db.md)
* [watch](watch.md)
* [defaults](defaults.md)
* notif
* [amqp](../notif/amqp.md)
* [discord](../notif/discord.md)
Expand Down
3 changes: 2 additions & 1 deletion docs/config/regopts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Overview

Registry options is used to authenticate against a registry during the analysis of an image:
Registry options are used to authenticate against a registry during the
analysis of an image:

```yaml
regopts:
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ nav:
- Overview: config/index.md
- .db: config/db.md
- .watch: config/watch.md
- .defaults: config/defaults.md
- .notif: config/notif.md
- .regopts: config/regopts.md
- .providers: config/providers.md
Expand Down