17 lines
607 B
Python
17 lines
607 B
Python
|
from config_util.config.fileprovider import FileConfigProvider
|
||
|
from config_util.config.testprovider import TestConfigProvider
|
||
|
from config_util.config.k8sprovider import KubernetesConfigProvider
|
||
|
|
||
|
|
||
|
def get_config_provider(config_volume, yaml_filename, py_filename, testing=False, kubernetes=False):
|
||
|
""" Loads and returns the config provider for the current environment. """
|
||
|
if testing:
|
||
|
return TestConfigProvider()
|
||
|
|
||
|
if kubernetes:
|
||
|
return KubernetesConfigProvider(config_volume, yaml_filename, py_filename)
|
||
|
|
||
|
return FileConfigProvider(config_volume, yaml_filename, py_filename)
|
||
|
|
||
|
|