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

[kube-prometheus-stack] Chore: Improve kubelet ServiceMonitor #5061

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

SuperQ
Copy link
Contributor

@SuperQ SuperQ commented Dec 15, 2024

What this PR does / why we need it

Refactor the Kubelet ServiceMonitor with a helper template for handling http/https schema. This will reduce the chance of copy-pasta mistakes when updating the different kubelet monitoring endpoints.

  • Define kube-prometheus-stack.kubelet.scheme for the port/schema.
  • Define kube-prometheus-stack.kubelet.authConfig for TLS access controls.

Which issue this PR fixes

  • none

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@SuperQ
Copy link
Contributor Author

SuperQ commented Dec 15, 2024

CC @Breee, I noticed some copy-pasta in this template when I was reviewing #5050, this should make it easier to understand this template.

@SuperQ SuperQ force-pushed the superq/refactor-kubelet_servicemonitor branch 3 times, most recently from d2beccb to bcf679a Compare December 15, 2024 20:12
jkroepke

This comment was marked as duplicate.

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

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

LGTM, based on your comment from an other PR, I have a question here.

Thanks for bringing the feature to my mind. 👍

@SuperQ SuperQ force-pushed the superq/refactor-kubelet_servicemonitor branch from bcf679a to c489a46 Compare December 15, 2024 20:44
Refactor the Kubelet ServiceMonitor with a helper template for handling
http/https schema. This will reduce the chance of copy-pasta mistakes
when updating the different kubelet monitoring endpoints.
* Define `kube-prometheus-stack.kubelet.scheme` for the port/schema.
* Define `kube-prometheus-stack.kubelet.authConfig` for TLS access controls.

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ force-pushed the superq/refactor-kubelet_servicemonitor branch from c489a46 to f205a4b Compare December 15, 2024 20:45
@SuperQ SuperQ requested a review from jkroepke December 15, 2024 20:47
Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

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

Thanks

@jkroepke jkroepke merged commit 9c2619e into main Dec 15, 2024
5 checks passed
@jkroepke jkroepke deleted the superq/refactor-kubelet_servicemonitor branch December 15, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants