diff --git a/helpers/kubernetes.py b/helpers/kubernetes.py index 7f29ade..09fcc68 100644 --- a/helpers/kubernetes.py +++ b/helpers/kubernetes.py @@ -143,7 +143,7 @@ def store_kubernetes_secret(secret_dict, namespace, update=False): ) except FailToCreateError as ex: current_app.logger.info(f"Secret not created because of exception {ex}") - return + raise ex current_app.logger.info(f"Secret {verb} with api response: {api_response}") @@ -172,7 +172,7 @@ def store_kustomization(kustomization_template_filepath, app_slug): except FailToCreateError as ex: current_app.logger.info( f"Could not create {app_slug} Kustomization because of exception {ex}") - return False + raise ex current_app.logger.debug(f"Kustomization created with api response: {api_response}") return True @@ -202,7 +202,7 @@ def delete_kustomization(kustomization_name): except ApiException as ex: current_app.logger.info( f"Could not delete {kustomization_name} Kustomization because of exception {ex}") - return False + raise ex current_app.logger.debug(f"Kustomization deleted with api response: {api_response}") return api_response