You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above example starts two Clair nodes using the same configuration.
31
-
One will only run the indexing facilities while the other will only run the
32
-
matching facilities.
30
+
One will only run the indexing facilities while the other will only run the matching facilities.
33
31
34
32
Environment variables respected by the Go standard library can be specified
35
33
if needed. Some notable examples:
@@ -41,10 +39,34 @@ if needed. Some notable examples:
41
39
If running in "combo" mode you **must** supply the `indexer`, `matcher`,
42
40
and `notifier` configuration blocks in the configuration.
43
41
42
+
## Configuration dropins
43
+
44
+
Starting in Clair version `4.7.0`, dropin configuration files are supported.
45
+
46
+
Given a root configurtaion file of `/etc/clair/config.json`, all files matching the globs `/etc/clair/config.json.d/*.json` and `/etc/clair/config.json.d/*.json-patch` would be loaded in lexical order after the root configuration file.
47
+
Similarly, given `/etc/clair/config.yaml`, all files matching the globs `/etc/clair/config.yaml.d/*.yaml` and `/etc/clair/config.yaml.d/*.yaml-patch` would be loaded.
48
+
Only the extensions `yaml` and `json` are supported, and indicate yaml and JSON formatting, respectively.
49
+
50
+
The dropin files must have the same extension and format as the root file.
51
+
Dropins with the bare suffix are treated as [merge documents](rfc7386).
52
+
Dropins with the `-patch` suffix are treated as [patch documents](rfc6902) and must contain a valid [RFC 6902](rfc6902) structure.
53
+
Yaml documents must be resolvable to the JSON subset.
54
+
55
+
Take care with the [merge](rfc7386) behavior around lists; a patch operation may be more suitable.
56
+
The `clairctl check-config` command can be used to ensure a merged configuration is what is intended.
57
+
In addition, placing `test` operations in a patch file that's evaluated last (such as `zz-validate.json-patch`) can be used to have Clair refuse to start if some configuration values are not what is intended.
58
+
59
+
The application defaults are applied *after* the configuration is loaded and as such, not reflected in the `clairctl check-config` command.
60
+
The output of that command is also not currently suitable to be used to "compile" a config to a single file.
0 commit comments