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. Image-level values usually replace defaults when set. Metadata values are merged with defaults, and provider-specific documentation calls out any other fields that merge instead of replacing defaults.
defaults:
watchMode: tag
notifyOn:
- new
- update
maxTags: 10
sortTags: reverse
includeTags:
- latest
excludeTags:
- dev
assumeImmutableTags: false
metadata:
foo: bar
Configuration¶
watchMode¶
Select which image tags to watch. (default tag)
| Value | Behavior |
|---|---|
tag |
Watch only the configured tag or digest |
all |
Watch all repository tags |
semver |
Watch newer stable semantic version tags |
semver+prereleases |
Watch newer version tags, including prereleases |
Every mode watches the configured image. Repository tags are sorted and filtered
before maxTags is applied. Manifest checks consume
registry quota.
Semver modes require a full version (1.5.0 or v1.5.0) and select strictly
newer tags. Docker variant suffixes such as -alpine are interpreted as
prereleases; use semver+prereleases and tag filters for these images. An invalid
or missing version logs an error and skips repository tags.
Per-image watch modes override defaults.
Config file
defaults:
watchMode: tag
Environment variables
DIUN_DEFAULTS_WATCHMODE=tag
notifyOn¶
List of image statuses that trigger notifications. (default new,update)
new: The image is not yet recorded in Diun's database.update: The image on the registry has changed since the previous scan.unchange: The image on the registry has not changed since the previous scan.
Config file
defaults:
notifyOn:
- new
- update
Environment variables
DIUN_DEFAULTS_NOTIFYON=new,update
maxTags¶
Maximum number of tags to watch. 0 means all of them. (default 0)
Warning
Only applies when watching repository tags.
Config file
defaults:
maxTags: 10
Environment variables
DIUN_DEFAULTS_MAXTAGS=10
sortTags¶
Sort tags method. Can be one of
default, reverse, semver, lexicographical. (default reverse)
Warning
Only applies when watching repository tags.
Config file
defaults:
sortTags: reverse
Environment variables
DIUN_DEFAULTS_SORTTAGS=reverse
includeTags¶
List of regular expressions to include tags. Can be useful when watching repository tags.
Config file
defaults:
includeTags:
- ^\d+\.\d+\.\d+$
Environment variables
DIUN_DEFAULTS_INCLUDETAGS=^\d+\.\d+\.\d+$
excludeTags¶
List of regular expressions to exclude tags. Can be useful when watching repository tags.
The file provider merges image-level exclude_tags
with these defaults. Default patterns come first, followed by image patterns,
with duplicates removed. Image-level include_tags still replace defaults.
Config file
defaults:
excludeTags:
- dev
Environment variables
DIUN_DEFAULTS_EXCLUDETAGS=dev
assumeImmutableTags¶
Assume tags never change after their first successful scan (default false).
Images already recorded in Diun's database are skipped without checking their
remote digest or updating their stored manifest. New images are still fetched
and validated normally, with complete metadata available to notifications.
Use this for immutable release tags when you only want to discover new tags.
Combine it with watchMode: all, semver, or semver+prereleases to discover
tags. Repository tag listing still occurs. With watchMode: tag, the selected
image is checked only until it is successfully recorded.
Republished tags, deleted images, and platform changes are not detected while
this option is enabled. Known images count as skipped, not unchanged, and do
not trigger notifications or set the update-available metric. notifyOn and
firstCheckNotif still control notifications for newly discovered images.
Disabling this option resumes checks against the last stored digest.
Config file
defaults:
watchMode: semver
assumeImmutableTags: true
Environment variables
DIUN_DEFAULTS_ASSUMEIMMUTABLETAGS=true
metadata¶
Additional metadata that can be used in notification template
Config file
defaults:
metadata:
foo: bar
Environment variables
DIUN_DEFAULTS_METADATA_FOO=bar