From 34a645840bf4d0bbde0108757eedce25d073fe4d Mon Sep 17 00:00:00 2001 From: Samuel Jones Date: Tue, 26 Nov 2024 10:03:05 +0000 Subject: [PATCH] Ensure liveness and readiness probes are written ASAP, and also ensure that probes wait 10 mintues. (#166) --- file_watcher/main.py | 1 + file_watcher_operator/file_watcher_operator.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/file_watcher/main.py b/file_watcher/main.py index 652fb2b..f7d1fbe 100644 --- a/file_watcher/main.py +++ b/file_watcher/main.py @@ -112,6 +112,7 @@ def start_watching(self) -> None: Start the PollingObserver with the queue based event handler and the given queue :return: None """ + write_readiness_probe_file() def _event_occurred(path_to_add: Union[Path, None]) -> None: if path_to_add is not None: diff --git a/file_watcher_operator/file_watcher_operator.py b/file_watcher_operator/file_watcher_operator.py index c4287ed..5ddc7a2 100644 --- a/file_watcher_operator/file_watcher_operator.py +++ b/file_watcher_operator/file_watcher_operator.py @@ -111,7 +111,7 @@ def generate_deployment_body( else exit 1 fi - initialDelaySeconds: 10 + initialDelaySeconds: 600 periodSeconds: 10 livenessProbe: exec: @@ -127,7 +127,7 @@ def generate_deployment_body( else exit 1 fi - initialDelaySeconds: 10 + initialDelaySeconds: 600 failureThreshold: 3 periodSeconds: 10 volumeMounts: