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

Migrate Kubelet ServiceMonitor to ScrapeConfigs #2235

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

paulfantom
Copy link
Member

WARNING: THIS IS A BREAKING CHANGE

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

As part of an attempt to remove management of kubelet Service in prometheus-operator (prometheus-operator/prometheus-operator#4295) kube-prometheus needs to migrate from using ServiceMonitor to new CRD of ScrapeConfig. This PR is doing exactly this.

New ScrapeConfigs give the same metric set as with previous ServiceMonitor with one notable change - label service: kubelet is no longer available as part of metrics.

When applying this configuration user should remove previous ServiceMonitor for kubelet.

PR is currently blocked on #2233 and #2234.
Changes are tested in https://github.com/thaum-xyz/ankhmorpork/tree/master/apps/monitoring/jsonnet

Type of change

What type of changes does your code introduce to the kube-prometheus? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Please put a one-line changelog entry below. Later this will be copied to the changelog file.

Remove ServiceMonitor for kubelet and switch to use ScrapeConfig

@steadyk
Copy link

steadyk commented May 23, 2024

Maybe you could use the ca.crt from the token Secret in the tls section to avoid the insecureSkipVerify?
See prometheus-operator/prometheus-operator#6517 (comment)
Just as hint.

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.

None yet

2 participants