Don't crash on fetching network policy.
Sometimes, on pod deletion it happens that kuryr network policy CRD
cannot be found anymore, but we get error from K8s API. Let's wait for
API is functional again.
@@ -319,8 +319,8 @@ def get_kuryrnetworkpolicy_crds(namespace=None):
LOG.exception("KuryrNetworkPolicy CRD not found")
return []
except k_exc.K8sClientException:
- LOG.exception("Kubernetes Client Exception")
- raise
+ LOG.exception("Exception during fetch KuryrNetworkPolicies. Retrying.")
+ raise k_exc.ResourceNotReady(knp_path)
return knps.get('items', [])
