Skip to content

Commit

Permalink
fix configmap conflict issue
Browse files Browse the repository at this point in the history
  • Loading branch information
winklermichael committed May 19, 2024
1 parent 687a204 commit 832aa09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions operator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ def get_serving_deployment():
)
return (
jsonify(
{"available": True if deployment.status.available_replicas else False}
{"available": True if deployment.status.available_replicas else False,
"url": "https://" + os.getenv("DOMAIN") + "/serving/" + auth_header}
),
200,
)
Expand All @@ -494,16 +495,21 @@ def delete_serving_deployment():
name="serving-" + auth_header, namespace=auth_header
)
logging.info(f"Serving deployment deleted successfully for {auth_header}")

# Delete the Service from the cluster
core_v1_api.delete_namespaced_service(
name="serving-" + auth_header, namespace=auth_header
)
logging.info(f"Serving service deleted successfully for {auth_header}")

# Delete the Ingress from the cluster
networking_v1_api.delete_namespaced_ingress(
name="serving-" + auth_header, namespace=auth_header
)
logging.info(f"Serving ingress deleted successfully for {auth_header}")
# Delete the ConfigMap from the cluster
core_v1_api.delete_namespaced_config_map(
name="serving-" + auth_header, namespace=auth_header
)


return jsonify(), 200
except ApiException as e:
Expand Down

0 comments on commit 832aa09

Please sign in to comment.