Reload
Monitors changes to configuration and symbol files to notify/restart affected pipeline units or the entire pipeline.
This mechanisms works in tandem with GitHub-Sync to enables symbol, lookup and configuration files to refresh at run time in order to reflect dynamic changes at the environment level.
For a real-world example see the policy function which updates the threshold settings for an output regulator based on environment-wide criteria.
Configuration
To configure the Config reloader unit, Edit these settings.
Below is the default configuration from: reload/config.yaml.
ewogICJ0eXBlIiA6ICJvYmplY3QiLAogICJwcm9wZXJ0aWVzIiA6IHsKICAgICJ0ZW54IiA6IHsKICAgICAgInR5cGUiIDogInN0cmluZyIKICAgIH0sCiAgICAicmVsb2FkIiA6IHsKICAgICAgInR5cGUiIDogIm9iamVjdCIsCiAgICAgICJhZGRpdGlvbmFsUHJvcGVydGllcyIgOiBmYWxzZSwKICAgICAgInByb3BlcnRpZXMiIDogewogICAgICAgICJwb2xsSW50ZXJ2YWwiIDogewogICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAic3RyaW5nIiwKICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICBdLAogICAgICAgICAgIm1hcmtkb3duRGVzY3JpcHRpb24iIDogIkludGVydmFsIGZvciBjaGVja2luZyBjaGFuZ2VzIHRvIGNvbmZpZy9yZXNvdXJjZSBmaWxlc1xuXG5EZWZpbmVzIHRoZSBpbnRlcnZhbCAoZS5nLiwgJzEwcycpIGZvciBjaGVja2luZyBtb2RpZmljYXRpb25zIHRvIGZpbGVzIG9uIGRpc2suIElmIHNldCB0byBudWxsIG9yIGVtcHR5IHZhbHVlLCBjaGFuZ2VzIHRvIGNvbmZpZyBhbmQgcmVzb3VyY2UgZmlsZXMgYXJlIG5vdCBwb2xsZWQuIgogICAgICAgIH0sCiAgICAgICAgInJlc3RhcnRQaXBlbGluZSIgOiB7CiAgICAgICAgICAidHlwZSIgOiBbCiAgICAgICAgICAgICJib29sZWFuIiwKICAgICAgICAgICAgInN0cmluZyIKICAgICAgICAgIF0sCiAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiUmVzdGFydCBwaXBlbGluZSB3aGVuIGNvbmZpZyBmaWxlcyBhcmUgY2hhbmdlZCBvbiBkaXNrXG5cbkNvbnRyb2xzIHdoZXRoZXIgdG8gd2F0Y2ggZm9yIG1vZGlmaWNhdGlvbnMgdG8gW2NvbmZpZ3VyYXRpb24gZmlsZXNdKGh0dHBzOi8vZG9jLmxvZzEweC5jb20vY29uZmlnLykuIE1vZGlmaWNhdGlvbnMgd2lsbCBpbml0aWF0ZSBhIHBpcGVsaW5lIGdyYWNlZnVsIHJlc3RhcnQuIFRoaXMgc2V0dGluZyBjYW4gb3BlcmF0ZSBpbiBjb25qdW5jdGlvbiB3aXRoIFtHaXRIdWIgY29uZmlnIHN5bmNdKGh0dHBzOi8vZG9jLmxvZzEweC5jb20vY29uZmlnL2dpdGh1Yi8pIHRvIGFsbG93IHBpcGVsaW5lcyB0byByZWxvYWQvcmVzdGFydCBmcm9tIGEgY2VudHJhbGl6ZWQgY29uZmlndXJhdGlvbiByZXBvc2l0b3J5IGF0IHJ1biB0aW1lLiAoQWNjZXB0cyBib29sZWFuIG9yIHN0cmluZyB3aXRoICQ9IHByZWZpeCBmb3IgcnVudGltZSBldmFsdWF0aW9uKSAoRGVmYXVsdDogdHJ1ZSkiLAogICAgICAgICAgImRlZmF1bHQiIDogdHJ1ZQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0sCiAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiA6IGZhbHNlCn0=
# 🔟❎ '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
# 'resourceFiles' defines whether to restart pipeline when config files are changed on disk.
restartPipeline: true
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.