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
Update Kubernetes driver #1667
Update Kubernetes driver #1667
Conversation
list_clusters(), etc. were confusing. They were renamed to list_namespaces(), etc.
Codecov Report
@@ Coverage Diff @@
## trunk #1667 +/- ##
==========================================
- Coverage 83.27% 83.25% -0.02%
==========================================
Files 400 400
Lines 87227 87463 +236
Branches 9260 9294 +34
==========================================
+ Hits 72638 72819 +181
- Misses 11448 11488 +40
- Partials 3141 3156 +15
Continue to review full report at Codecov.
|
@@ -45,6 +45,7 @@ def __init__( | |||
ip_addresses, # type: List[str] | |||
driver, # type: ContainerDriver | |||
extra=None, # type: dict | |||
created_at=None, # type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it should be fine adding it to the base API since it's added to the end and shouldn't break existing code.
created_at: str, | ||
replicas: int, | ||
selector: Dict[str, Any], | ||
extra: Optional[Dict[str, Any]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for including type annotations everywhere 👍
) | ||
|
||
|
||
def to_n_bytes(memory_str: str) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also wouldn't hurt to add direct test cases for all those utility conversion functions :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, I added the test cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay - thanks for addressing the feedback and LGTM 👍
Updates for Kubernetes driver
Description
Implement list methods for Kubernetes nodes,services,deployments and node/pod metrics.
Add more fields to pods & containers.
Rename clusters to namespaces since cluster was used as an alias for namespace.
Add type hints
Status
Checklist (tick everything that applies)