Skip to content

Commit

Permalink
expose oslo_config env var support
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Nov 2, 2024
1 parent d9f5782 commit c134099
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions st2actions/st2actions/notifier/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2actions/st2actions/scheduler/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@


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


Expand Down
3 changes: 3 additions & 0 deletions st2actions/st2actions/workflows/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@


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


Expand Down
3 changes: 3 additions & 0 deletions st2api/st2api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2auth/st2auth/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_'.
cfg.CONF._env_driver = st2cfg.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2reactor/st2reactor/garbage_collector/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2reactor/st2reactor/rules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2reactor/st2reactor/sensor/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = st2cfg.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2reactor/st2reactor/timer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
cfg.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
3 changes: 3 additions & 0 deletions st2stream/st2stream/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@


def parse_args(args=None):
# Override oslo_config's 'OS_' env var prefix with 'ST2_'.
cfg.CONF._env_driver = common_config.St2EnvironmentConfigurationSource()
cfg.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

0 comments on commit c134099

Please sign in to comment.