-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add KubeletBase
base class
#9051
Conversation
6cbc135
to
e1ae6aa
Compare
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.
🥇
from datadog_checks.base import AgentCheck | ||
from datadog_checks.base.utils.date import UTC, parse_rfc3339 |
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.
Let's use relative throughout:
from datadog_checks.base import AgentCheck | |
from datadog_checks.base.utils.date import UTC, parse_rfc3339 | |
from ...utils.date import UTC, parse_rfc3339 | |
from .. import AgentCheck |
from datadog_checks.base.checks.kubelet_base.base import KubeletBase, urljoin | ||
from datadog_checks.base.utils.date import UTC | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) |
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.
from datadog_checks.dev import get_here |
return f.read() | ||
|
||
|
||
class MockStreamResponse: |
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.
Let's use #8276 e.g.
mock_http_response(file_path=get_fixture_path('linkerd_v2.txt')) |
KubeletBase
base class
33136c0
to
2add9cf
Compare
What does this PR do?
Add kubelet_base in datadog_checks_base to be used for checks that need to access Kubelet
Motivation
Put shared code in a single place
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached