Always stop pod

This commit is contained in:
Benedikt Ziemons 2020-11-14 18:59:47 +01:00
parent fd60cef69b
commit cd06cc445e
Signed by: ben
GPG key ID: 0F54A7ED232D3319

View file

@ -53,6 +53,7 @@ class PodKeeper:
last_check = datetime.utcnow()
print(f"Starting pod {self.podname} at {last_check}", file=sys.stderr, flush=True)
podman.play.kube(self.podyaml, *self.podnet_args)
try:
sdnotify("--ready")
while not self.stopping.is_set():
self.waiter.wait()
@ -77,6 +78,7 @@ class PodKeeper:
print("Error reloading pod", file=sys.stderr, flush=True)
traceback.print_exc()
finally:
self.stop_sequence()
def stop_sequence(self):