Skip to content

istio k8s discovery #5854

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 27 commits into from
Mar 31, 2025
Merged

istio k8s discovery #5854

merged 27 commits into from
Mar 31, 2025

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Feb 1, 2025

This adds istio k8s discovery with a pod.container rule to connect to any istio container and extract metrics.

@atoulme atoulme force-pushed the istio branch 5 times, most recently from 0b8aeda to f331816 Compare February 2, 2025 06:48
@atoulme atoulme marked this pull request as ready for review February 2, 2025 07:07
@atoulme atoulme requested review from a team as code owners February 2, 2025 07:07
@atoulme atoulme changed the title Spike: test istio k8s discovery istio k8s discovery Feb 2, 2025
Copy link
Contributor

@hughesjj hughesjj left a comment

Choose a reason for hiding this comment

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

I'm good with it other than wanting some more readme/guidance of these new .sh files

@jinja2 jinja2 marked this pull request as draft March 26, 2025 15:25
@jinja2
Copy link
Contributor

jinja2 commented Mar 26, 2025

Converted to draft since I am working on fixes for the PR. The discovery config needs updates to work with istio-proxy, gateways and pilot.

default:
config:
scrape_configs:
- job_name: 'istio'
Copy link
Contributor

Choose a reason for hiding this comment

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

This shows up as service.name in the final metrics. Any feedback on a better name is welcome.

@jinja2 jinja2 marked this pull request as ready for review March 27, 2025 17:18
{{ receiver "prometheus/istio" }}:
enabled: true
rule:
k8s_observer: type == "pod" and ("istio.io/rev" in annotations or labels["istio"] == "pilot" or name matches "istio.*")
Copy link
Contributor

@jinja2 jinja2 Mar 28, 2025

Choose a reason for hiding this comment

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

I am not checking for the std annotations["prometheus.io/scrape"] == "true". My thinking is that with discovery mode we are not expecting users to do the pre-work of adding these, but then on the other hand, this would be an easy way for users to opt-out certain pods.

@dmitryax dmitryax dismissed hughesjj’s stale review March 31, 2025 17:24

the comment seems to be addressed

@jinja2 jinja2 merged commit 76c026c into main Mar 31, 2025
256 checks passed
@jinja2 jinja2 deleted the istio branch March 31, 2025 17:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants