Skip to content

Commit

Permalink
add ST2_ env var handling to actionrunner and reactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Nov 9, 2024
1 parent f0bee02 commit 9256f36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions st2actions/st2actions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
CONF(
args=args,
version=VERSION_STRING,
default_config_files=[DEFAULT_CONFIG_FILE_PATH],
use_env=True, # Make our env var support explicit (default is True)
)


Expand Down
2 changes: 2 additions & 0 deletions st2reactor/st2reactor/cmd/trigger_re_fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def _parse_config():
CONF.register_cli_opts(cli_opts)
st2cfg.register_opts(ignore_errors=False)

# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
CONF._env_driver = st2cfg.St2EnvironmentConfigurationSource()
CONF(args=sys.argv[1:])


Expand Down

0 comments on commit 9256f36

Please sign in to comment.