Skip to content

Commit

Permalink
Do not retry the deployment restart if the file is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Aug 5, 2024
1 parent 9a9370a commit 982553b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/lvmapi/tools/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ def restart_deployment(self, deployment: str, from_file: bool = True):
try:
file_ = self.get_yaml_file(deployment)
except ValueError as err:
warnings.warn(
f"Failed restarting from file: {err} "
"Doing rollout restart instead."
)
return self.restart_deployment(deployment, from_file=False)
raise RuntimeError(f"Failed restarting from file: {err} ")

if deployment in self.list_deployments():
self.delete_deployment(deployment)
Expand Down

0 comments on commit 982553b

Please sign in to comment.