From ba7592e17b961064335ffc20a30fc59f28ac0369 Mon Sep 17 00:00:00 2001 From: Minjong Kim Date: Mon, 26 Jul 2021 16:55:37 +0900 Subject: [PATCH] Update thirdparty.py for support kubernetes_asyncio. The model of the official sdk of kubernetes and the model of kubernetes_asyncio work the same. --- kopf/_cogs/helpers/thirdparty.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kopf/_cogs/helpers/thirdparty.py b/kopf/_cogs/helpers/thirdparty.py index 25dab70f..a4ccc26c 100644 --- a/kopf/_cogs/helpers/thirdparty.py +++ b/kopf/_cogs/helpers/thirdparty.py @@ -35,6 +35,8 @@ def __subclasshook__(cls, subcls: Any) -> Any: # suppress types in this hack if cls is KubernetesModel: if any(C.__module__.startswith('kubernetes.client.models.') for C in subcls.__mro__): return True + if any(C.__module__.startswith('kubernetes_asyncio.client.models.') for C in subcls.__mro__): + return True return NotImplemented @property