Commit cdfe0ced authored by Lionel Walter's avatar Lionel Walter
Browse files

Read drupal api key from kubernetes secret

parent bce9a600
Pipeline #10128 passed with stages
in 4 minutes and 33 seconds
...@@ -25,7 +25,9 @@ def create_app(test_config=None): ...@@ -25,7 +25,9 @@ def create_app(test_config=None):
api = Api(app) api = Api(app)
# todo : raise an exception when environment variable not present
app.config['kafka-broker-url'] = os.environ['KAFKA_BOOTSTRAP_SERVERS'] app.config['kafka-broker-url'] = os.environ['KAFKA_BOOTSTRAP_SERVERS']
app.config['drupal-api-key'] = os.environ['DRUPAL_API_KEY']
app.config['SWAGGER'] = { app.config['SWAGGER'] = {
'title': 'Memobase Import API', 'title': 'Memobase Import API',
......
...@@ -33,7 +33,7 @@ class WriteJobResultToDrupal(Resource): ...@@ -33,7 +33,7 @@ class WriteJobResultToDrupal(Resource):
headers = { headers = {
'Content-Type': 'application/vnd.api+json', 'Content-Type': 'application/vnd.api+json',
'Accept': 'application/vnd.api+json', 'Accept': 'application/vnd.api+json',
'X-API-Key': current_app.config['DRUPAL_API_KEY'] 'X-API-Key': current_app.config['drupal-api-key']
} }
data = { data = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment