Skip to content

jsonnet/components/prometheus: Fix thanos-sidecar metrics access #2330

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

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

bison
Copy link
Contributor

@bison bison commented Jan 12, 2024

Description

When enabled, the thanos-sidecar opens an HTTP listener on port 10902, which is what's used to scrape metrics. This port wasn't being added to the Prometheus Service, so wasn't added to the NetworkPolicy causing scraping to fail from Prometheus instances other than the local one.

This adds the port to the Service and NetworkPolicy.

Fixes: #2006

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.

Add thanos-sidecar metrics port to Prometheus Service and NetworkPolicy.

When enabled, the thanos-sidecar opens an HTTP listener on port 10902,
which what's used to scrape metrics.  This port wasn't being added to
the Prometheus Service, so wasn't added to the NetworkPolicy causing
scraping to fail from Prometheus instances other than the local one.

This adds the port to the Service and NetworkPolicy.

Fixes: #2006
@philipgough
Copy link
Contributor

lgtm thanks @bison

@philipgough philipgough merged commit 895db2a into prometheus-operator:main Jan 15, 2024
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.

thanos-sidecar port is not added to NetworkPolicy
2 participants