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

Use DNS name from the Service instead of the Pod IP #1186

Closed
juldrixx opened this issue Nov 7, 2024 · 1 comment
Closed

Use DNS name from the Service instead of the Pod IP #1186

juldrixx opened this issue Nov 7, 2024 · 1 comment

Comments

@juldrixx
Copy link

juldrixx commented Nov 7, 2024

I've a PodMonitoring resource using mTLS to authenticate to an application, the issue is that GMP is using the IP address of the pod to call the application but the IP is not in DNS names of my certificate.

Get "https://10.4.1.93:8443/nifi-api/flow/metrics/prometheus": tls: failed to verify certificate: x509: cannot validate certificate for 10.4.1.93 because it doesn't contain any IP SANs

Is there a way to make it call the DNS name of the Service exposing the pod instead of the IP address?

@TheSpiritXIII
Copy link
Member

Thanks for the bug report! If you were using vanilla Prometheus, you may be able to use a relabel config. Replace __address__, changing only the hostname and keeping the URL path and port numbers.

Unfortunately, it seems like GMP forbids replacing the special __address__ label (see documentation https://github.com/GoogleCloudPlatform/prometheus-engine/blob/main/doc/api.md#scrapeendpoint). GMP tries to be opinionated to prevent footguns.

In this case, I can envision something like this becoming a flag in the future, where setting it automatically adds the relabeling config.

@bernot-dev bernot-dev removed their assignment Dec 2, 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

No branches or pull requests

3 participants