diff --git a/meta-operator.py b/meta-operator.py index 2ca8886..fb13411 100755 --- a/meta-operator.py +++ b/meta-operator.py @@ -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