Add 410 return code handling
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
9c8e73b04f
commit
f0f72b3b89
@ -9,6 +9,7 @@ import string
|
||||
import yaml
|
||||
from prometheus_client import Counter, Gauge
|
||||
from kubernetes_asyncio.client.api_client import ApiClient
|
||||
from kubernetes_asyncio.client.exceptions import ApiException
|
||||
from kubernetes_asyncio import client, config, watch
|
||||
from time import time
|
||||
import argparse
|
||||
@ -221,6 +222,12 @@ async def main():
|
||||
try:
|
||||
gauge_watch_stream_begin_timestamp.set(time())
|
||||
await update_loop(v1, apps_api, api_instance, revision)
|
||||
except ApiException as e:
|
||||
logger.debug("Caught exception: %s", e)
|
||||
if e.status == 410:
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
except asyncio.exceptions.TimeoutError:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user