Add Kubernetes configuration provider which writes config to a secret
Fixes #145
This commit is contained in:
parent
88a04441de
commit
fd3a21fba9
10 changed files with 179 additions and 44 deletions
6
app.py
6
app.py
|
@ -32,7 +32,6 @@ from util.config.oauth import (GoogleOAuthConfig, GithubOAuthConfig, GitLabOAuth
|
|||
from util.security.signing import Signer
|
||||
from util.saas.cloudwatch import start_cloudwatch_sender
|
||||
from util.saas.metricqueue import MetricQueue
|
||||
from util.saas.queuemetrics import QueueMetrics
|
||||
from util.config.provider import get_config_provider
|
||||
from util.config.configutil import generate_secret_key
|
||||
from util.config.superusermanager import SuperUserManager
|
||||
|
@ -55,10 +54,11 @@ class RegexConverter(BaseConverter):
|
|||
|
||||
app.url_map.converters['regex'] = RegexConverter
|
||||
|
||||
# Instantiate the default configuration (for test or for normal operation).
|
||||
# Instantiate the configuration.
|
||||
is_testing = 'TEST' in os.environ
|
||||
is_kubernetes = 'KUBERNETES_SERVICE_HOST' in os.environ
|
||||
config_provider = get_config_provider(OVERRIDE_CONFIG_DIRECTORY, 'config.yaml', 'config.py',
|
||||
testing=is_testing)
|
||||
testing=is_testing, kubernetes=is_kubernetes)
|
||||
|
||||
if is_testing:
|
||||
from test.testconfig import TestConfig
|
||||
|
|
Reference in a new issue