Skip to content
Snippets Groups Projects
Commit d74c9b2e authored by Shane Hutchins's avatar Shane Hutchins
Browse files

Azure fix for M20 and M21

parent bce0e1c6
No related branches found
No related tags found
1 merge request!430Azure fix for M20 and M21
......@@ -33,10 +33,12 @@ def get_opa_config(namespace="osdu-services", name="opa-config", config_only=Tru
try:
api_response = v1.read_namespaced_config_map(namespace=namespace, name=name, pretty=pretty)
if config_only:
if "config" in api_response.data:
return api_response.data["config"]
if "opa-config.yaml" in api_response.data:
return api_response.data["opa-config.yaml"]
elif "config.yaml" in api_response.data:
return api_response.data["config.yaml"]
elif "config" in api_response.data:
return api_response.data["config"]
else:
logger.error(f"Exception {api_response.data}")
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment