Reload
Watches the local filesystem for in-place change events on configuration and symbol files, and notifies/restarts affected pipeline units or the entire pipeline.
This mechanism works in tandem with GitHub-Sync or the @kubernetes launch macro, which pulls named ConfigMap keys via the Kubernetes API and writes them to a local folder via atomic file replace, so the reload watcher sees a real change event and refreshes symbol, lookup, and configuration files at run time. A raw ConfigMap volume mount uses symlink swap and is NOT detected by the reload watcher, so use the @kubernetes macro instead.
For a real-world example see the rate receiver, which reloads its field-set mute file on disk changes. A GitOps-synced commit propagates to every pod on its next sync tick (default 30s for @kubernetes), and each pipeline reloads when the new file lands on disk.
Config Files
To configure the Config reloader unit, Edit these files.
Below is the default configuration from: reload/config.yaml.
ewogICJ0eXBlIiA6ICJvYmplY3QiLAogICJwcm9wZXJ0aWVzIiA6IHsKICAgICJ0ZW54IiA6IHsKICAgICAgInR5cGUiIDogInN0cmluZyIKICAgIH0sCiAgICAicmVsb2FkIiA6IHsKICAgICAgInR5cGUiIDogIm9iamVjdCIsCiAgICAgICJhZGRpdGlvbmFsUHJvcGVydGllcyIgOiBmYWxzZSwKICAgICAgInByb3BlcnRpZXMiIDogewogICAgICAgICJwb2xsSW50ZXJ2YWwiIDogewogICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAic3RyaW5nIiwKICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICBdLAogICAgICAgICAgIm1hcmtkb3duRGVzY3JpcHRpb24iIDogIkludGVydmFsIGZvciBjaGVja2luZyBjaGFuZ2VzIHRvIGNvbmZpZy9yZXNvdXJjZSBmaWxlc1xuXG5EZWZpbmVzIHRoZSBpbnRlcnZhbCAoZS5nLiwgJzEwcycpIGZvciBjaGVja2luZyBtb2RpZmljYXRpb25zIHRvIGZpbGVzIG9uIGRpc2suIElmIHNldCB0byBudWxsIG9yIGVtcHR5IHZhbHVlLCBjaGFuZ2VzIHRvIGNvbmZpZyBhbmQgcmVzb3VyY2UgZmlsZXMgYXJlIG5vdCBwb2xsZWQuIgogICAgICAgIH0sCiAgICAgICAgInJlc3RhcnRQaXBlbGluZSIgOiB7CiAgICAgICAgICAidHlwZSIgOiBbCiAgICAgICAgICAgICJib29sZWFuIiwKICAgICAgICAgICAgInN0cmluZyIsCiAgICAgICAgICAgICJudWxsIgogICAgICAgICAgXSwKICAgICAgICAgICJtYXJrZG93bkRlc2NyaXB0aW9uIiA6ICJSZXN0YXJ0IHBpcGVsaW5lIHdoZW4gY29uZmlnIGZpbGVzIGFyZSBjaGFuZ2VkIG9uIGRpc2tcblxuQ29udHJvbHMgd2hldGhlciB0byB3YXRjaCBmb3IgbW9kaWZpY2F0aW9ucyB0byBbY29uZmlndXJhdGlvbiBmaWxlc10oaHR0cHM6Ly9kb2MubG9nMTB4LmNvbS9jb25maWcvKS4gTW9kaWZpY2F0aW9ucyB3aWxsIGluaXRpYXRlIGEgcGlwZWxpbmUgZ3JhY2VmdWwgcmVzdGFydC4gVGhpcyBzZXR0aW5nIGNhbiBvcGVyYXRlIGluIGNvbmp1bmN0aW9uIHdpdGggW0dpdEh1YiBjb25maWcgc3luY10oaHR0cHM6Ly9kb2MubG9nMTB4LmNvbS9jb25maWcvZ2l0aHViLykgdG8gYWxsb3cgcGlwZWxpbmVzIHRvIHJlbG9hZC9yZXN0YXJ0IGZyb20gYSBjZW50cmFsaXplZCBjb25maWd1cmF0aW9uIHJlcG9zaXRvcnkgYXQgcnVuIHRpbWUuIChBY2NlcHRzIGJvb2xlYW4gb3Igc3RyaW5nIHdpdGggJD0gcHJlZml4IGZvciBydW50aW1lIGV2YWx1YXRpb24pIChEZWZhdWx0OiB0cnVlKSIsCiAgICAgICAgICAiZGVmYXVsdCIgOiB0cnVlCiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfSwKICAiYWRkaXRpb25hbFByb3BlcnRpZXMiIDogZmFsc2UKfQ==
# 🔟❎ 'run' reload pipeline configuration
# Monitors changes to configuration and symbol files to notify/restart affected pipeline units or the entire pipeline.
# To learn more see https://doc.log10x.com/run/reload/
# Set the 10x pipeline to 'run'
tenx: run
# ============================== Reload Options ===============================
reload:
# 'pollInterval' defines the interval for checking changes to files
pollInterval: 10s
# 'restartPipeline' controls whether a change to a pipeline config file
# (.yaml / .js) triggers a full pipeline restart. Resource files (e.g. the
# compact receiver's lookup CSV) always hot-reload via FileResourceLookup
# regardless of this setting, this flag only affects pipeline-config-file
# changes. Default false so routine resource-file edits don't take the
# whole pipeline down.
restartPipeline: false
Options
Specify the options below to configure the Config reloader:
| Name | Description |
|---|---|
| reloadPollInterval | Interval for checking changes to config/resource files |
| reloadRestartPipeline | Restart pipeline when config files are changed on disk |
reloadPollInterval
Interval for checking changes to config/resource files.
| Type | Default |
|---|---|
| String | "" |
Defines the interval (e.g., '10s') for checking modifications to files on disk. If set to null or empty value, changes to config and resource files are not polled.
reloadRestartPipeline
Restart pipeline when config files are changed on disk.
| Type | Default |
|---|---|
| Boolean | true |
Controls whether to watch for modifications to configuration files. Modifications will initiate a pipeline graceful restart. This setting can operate in conjunction with GitHub config sync to allow pipelines to reload/restart from a centralized configuration repository at run time.
This unit is defined in reload/unit.yaml.