Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thirdparty support for kubernetes_asyncio? #806

Closed
caffeinism opened this issue Jul 22, 2021 · 2 comments · May be fixed by #809
Closed

thirdparty support for kubernetes_asyncio? #806

caffeinism opened this issue Jul 22, 2021 · 2 comments · May be fixed by #809
Labels
enhancement New feature or request

Comments

@caffeinism
Copy link

Problem

I am using the kubernetes_asyncio library to asynchronously call to Kubernetes APIs.

However, kopf.adopt(naturally harmonize_naming, adjust_namespace and label too) supports kubernetes.client.model but not kubernetes_asyncio.client.model.

if any(C.__module__.startswith('kubernetes.client.models.') for C in subcls.__mro__):

Since kubernetes_asyncio follows the model of the kubernetes python sdk as it is, there is no problem with compatibility.

Proposal

I wish this project also supports kubernetes_asyncio.

Code

if any(C.__module__.startswith('kubernetes.client.models.') for C in subcls.__mro__): 
    return True

It would be nice to change that part to

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

Additional information

No response

@caffeinism caffeinism added the enhancement New feature or request label Jul 22, 2021
@nolar
Copy link
Owner

nolar commented Jul 24, 2021

Hello. I agree this will be better. Would you like to send a pull request? If so, please also update docs/hierarchies.rst to mention this change — the very top and the very bottom of the file (at least the links, no need for code snippets, I guess).

@m3talstorm
Copy link

We also need this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants