|
45 | 45 | AWS_CONFIG_VOLUME_NAME = "aws-client-config" |
46 | 46 | AWS_CONFIG_MOUNT_PATH = "/home/non-root/.aws" |
47 | 47 | FLYTE_POD_ANNOTATIONS = {"proxy.istio.io/config": '{ "holdApplicationUntilProxyStarts": true, ' |
48 | | - '"terminationDrainDuration": "10s" }'} |
| 48 | + '"terminationDrainDuration": "30s" }'} |
49 | 49 | SPICEDB_TLS_SECRETS_VOLUME_NAME = "tls-secrets" |
50 | 50 | SPICEDB_TLS_SECRETS_MOUNT_PATH = "/etc/tls-secrets" |
51 | 51 | TERM_ISTIO_PROXY_URL = "http://127.0.0.1:15020/quitquitquit" |
@@ -386,21 +386,21 @@ def get_flyte_pod_spec( |
386 | 386 |
|
387 | 387 | def _terminate_istio_proxy(n_trials: int = 10, timeout: float = 1.0, sleep_sec: float = 1.0): |
388 | 388 | is_terminated = False |
389 | | - sleep(5) |
| 389 | + logger.info("starting terminating the istio-proxy container - new") |
390 | 390 | for step in range(1, n_trials + 1): |
391 | | - try: |
392 | | - response = requests.post(TERM_ISTIO_PROXY_URL, timeout=timeout) |
| 391 | + try: |
| 392 | + response = requests.post(TERM_ISTIO_PROXY_URL, timeout=timeout) |
393 | 393 |
|
394 | | - if response.status_code == 200: |
395 | | - is_terminated = True |
396 | | - break |
397 | | - except Exception as e: |
398 | | - logger.warning("[%d/%d] Cannot terminate istio proxy: %s", step, n_trials, e) |
| 394 | + if response.status_code == 200: |
| 395 | + is_terminated = True |
| 396 | + break |
| 397 | + except Exception as e: |
| 398 | + logger.warning("[%d/%d] Cannot terminate istio proxy: %s", step, n_trials, e) |
399 | 399 |
|
400 | | - sleep(sleep_sec) |
| 400 | + sleep(sleep_sec) |
401 | 401 |
|
402 | 402 | if not is_terminated: |
403 | | - logger.error("Cannot terminate istio proxy") |
| 403 | + logger.error("Cannot terminate istio proxy") |
404 | 404 |
|
405 | 405 |
|
406 | 406 | DEFAULT_TASK_CONFIG = Pod( |
|
0 commit comments