Skip to content

Conversation

@jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Apr 17, 2025

Closes #600

Added a generic exec() method to the APIObject base class. It checks for a ready_pods() method, if it doesn't exist it raises a NotImplementedError. If it does exist it gets the first Pod from ready_pods() and then calls exec() on that Pod passing the args/kwargs along.

Also added a ready_pods() method to Deployment which applied a ready filter to the existing pods() method.

@jacobtomlinson jacobtomlinson changed the title Exec ready pods Adds an exec() method for any object with a ready_pods() method Apr 17, 2025
@jacobtomlinson jacobtomlinson merged commit 1afa80e into kr8s-org:main Apr 17, 2025
12 checks passed
@jacobtomlinson jacobtomlinson deleted the exec-ready-pods branch April 17, 2025 15:26
@jacobtomlinson jacobtomlinson added the enhancement New feature or request label Apr 28, 2025
@codecov
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 81.81818% with 6 lines in your changes missing coverage. Please review.

Project coverage is 93.94%. Comparing base (87063fc) to head (1ee2257).
Report is 236 commits behind head on main.

Files with missing lines Patch % Lines
kr8s/_objects.py 72.72% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #605      +/-   ##
==========================================
- Coverage   94.61%   93.94%   -0.68%     
==========================================
  Files          29       30       +1     
  Lines        3141     4309    +1168     
==========================================
+ Hits         2972     4048    +1076     
- Misses        169      261      +92     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request kr8s tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add exec support to Deployment and Service

1 participant