Skip to content

Commit

Permalink
Update thirdparty.py to using kubernetes_asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeinism authored Jul 27, 2021
1 parent 4067389 commit 5b4a688
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kopf/_cogs/helpers/thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ class _dummy: pass
except ImportError:
PykubeObject = _dummy

V1ObjectMeta = V1OwnerReference = None

try:
from kubernetes_asyncio.client import V1ObjectMeta as V1ObjectMeta, V1OwnerReference as V1OwnerReference
except ImportError:
pass
try:
from kubernetes.client import V1ObjectMeta as V1ObjectMeta, V1OwnerReference as V1OwnerReference
except ImportError:
V1ObjectMeta = V1OwnerReference = None
pass


# Kubernetes client does not have any common base classes, its code is fully generated.
Expand Down

0 comments on commit 5b4a688

Please sign in to comment.