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

Implement MetricsCollector for Kubernetes Metrics Retrieval and Proce… #64

Merged
merged 8 commits into from
May 14, 2024

Conversation

see-quick
Copy link
Contributor

@see-quick see-quick commented May 13, 2024

…ssing

PR Description:

This PR introduces the MetricsCollector, a tool specifically designed for gathering and managing metrics from Kubernetes pods. It uses a flexible builder pattern that makes it straightforward to configure and adapt to various Kubernetes environments. The key features of this implementation include:

  • Easy configuration options for setting the namespace, scraper pod, and metrics components.
  • Flexible methods for either scheduled or on-demand metrics collection.
  • Robust error handling to address scenarios like missing pods, incomplete data, or collection errors.

The PR also includes a suite of unit tests that simulate Kubernetes interactions using mock objects. These tests thoroughly check the setup and functionality of the metrics collection, ensuring the system is resilient and behaves as expected under various conditions.

Solves [1]

[1] - #29.

@see-quick see-quick self-assigned this May 13, 2024
@see-quick see-quick added the enhancement New feature or request label May 13, 2024
@see-quick see-quick added this to the 0.1.0 milestone May 13, 2024
@kornys
Copy link
Member

kornys commented May 14, 2024

please also fix javadoc issues and rebase on latest main

Copy link
Member

@im-konge im-konge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@see-quick
Copy link
Contributor Author

please also fix javadoc issues and rebase on latest main

fix javadoc and rebased

@see-quick
Copy link
Contributor Author

btw I have also verified my implementation based on this PR [1] in operator repo works without any problem :)

[1] - https://github.com/strimzi/strimzi-kafka-operator/compare/main...see-quick:strimzi-kafka-operator:metrics-collector-test-frame-integration?expand=1

@see-quick
Copy link
Contributor Author

Also, I was wondering if we want to add a system-level test in the test-frame-test module. But not sure if this PR should cover it

@kornys
Copy link
Member

kornys commented May 14, 2024

Also, I was wondering if we want to add a system-level test in the test-frame-test module. But not sure if this PR should cover it

I agree it can be done in separated PR later

…ssing

Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
@see-quick see-quick merged commit d359c3e into main May 14, 2024
3 checks passed
@see-quick see-quick deleted the metrics-collector-v1 branch May 14, 2024 10:50
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 this pull request may close these issues.

None yet

4 participants