kr8s-org / kr8s

A batteries-included Python client library for Kubernetes that feels familiar for folks who already know how to use kubectl
https://kr8s.org
BSD 3-Clause "New" or "Revised" License
839 stars 45 forks source link

Correctly set plural name in get when looking up unknown resources #464

Closed jacobtomlinson closed 3 months ago

jacobtomlinson commented 3 months ago

Closes #460

Updates lookup_kind() to also return the plural form of the resource kind. Also updates get_kind() to pass that plural along to new_class() to ensure dynamic classes are created correctly.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.11%. Comparing base (87063fc) to head (7fc9a3b). Report is 128 commits behind head on main.

Files with missing lines Patch % Lines
kr8s/_api.py 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #464 +/- ## ========================================== + Coverage 94.61% 95.11% +0.49% ========================================== Files 29 30 +1 Lines 3141 3889 +748 ========================================== + Hits 2972 3699 +727 - Misses 169 190 +21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.