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

Use configMapName as well

parent e87b2797
......@@ -60,20 +60,26 @@ class JobStart(Resource):
response = requests.get(mapping_file_url)
mapping_file_content = response.text
config_map_name = process_id+"-mapper-service-mapping-config"
# Instantiate the configmap object
metadata = client.V1ObjectMeta(
labels=dict(app="import-api-app"),
name=process_id+"-mapper-service-mapping-config",
name=config_map_name,
namespace=current_app.config['NAMESPACE'],
)
configmap = client.V1ConfigMap(
api_version="v1",
kind="ConfigMap",
data=dict(test=mapping_file_content),
data=dict(mapping=mapping_file_content),
metadata=metadata
)
# use mapping as well as name for the config as above
job_parameters['configFileName'] = "mapping"
job_parameters['configMapName'] = config_map_name
v1 = client.CoreV1Api()
v1.create_namespaced_config_map(
......
Markdown is supported
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