Skip to content

Commit

Permalink
Update thirdparty.py for support kubernetes_asyncio.
Browse files Browse the repository at this point in the history
The model of the official sdk of kubernetes and the model of kubernetes_asyncio work the same.

Signed-off-by: Kim Minjong <make.dirty.code@gmail.com>
  • Loading branch information
caffeinism committed Jul 26, 2021
1 parent 308e7ff commit fd05154
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kopf/_cogs/helpers/thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd05154

Please sign in to comment.