Skip to content

Allow file references in PodMonitorEndpointTLSConfig #3922

Closed

Description

@okhaliavka

What is missing?
PodMonitorEndpointTLSConfig doesn't allow to reference certificates and key files.

Why do we need it?
This is causing us some trouble with Istio. As explained in istio docs, sidecar proxy can't deal with scraping requests because they are destined for pod's IP, so in order to scrape metrics over TLS sidecar should be configured to save certs and key to a volume and job's TLS config should reference them. While it is possible to achieve with ServiceMonitor, it is not with PodMonitor. And unfortunately there is no obvious way to dump these certs and key to a secret/configmap.

  • Prometheus Operator version:

    v0.43.2

Activity

  1. simonpasquier commented on Mar 19, 2021

    @simonpasquier
    Contributor

    It's on purpose that PodMonitors (as well as Probes) can't reference files that reside on the Prometheus pod's filesystem. It avoids exposing sensitive materials to the scraped targets inadvertently. ServiceMonitors support this because they predate PodMonitors and we can't change the API.

  2. okhaliavka commented on Mar 23, 2021

    @okhaliavka
    Author

    @simonpasquier Is it reasonable to assume that this functionality in ServiceMonitor will be deprecated in the future? Could it be added to PodMonitors with the flag to opt-out of this behavior (like ArbitraryFSAccessThroughSMsConfig)?

  3. ThiruNandagopal commented on Jun 23, 2021

    @ThiruNandagopal

    It would be great if we have this feature in podmonitor also similar to servicemonitor as we don't need to follow 2 different approach for same feature.

  4. mblaschke commented on May 30, 2022

    @mblaschke

    Would be nice to have this feature also for PodMonitor to support fetching metrics with Istio

  5. EronWright commented on May 11, 2023

    @EronWright

    I have a suggestion for a fix, feedback welcome. #4121 (comment)

    Update: I submitted a formal proposal for this idea: #5572

  6. abohne commented on Aug 24, 2023

    @abohne

    Any updates on this?

  7. taisph commented on Apr 23, 2024

    @taisph

    Is this issue also why a tlsConfig with files in a scrape class is not applied to PodMonitors? The same scrape class works with ServiceMonitors.

  8. simonpasquier commented on Apr 29, 2024

    @simonpasquier
    Contributor

    ScrapeClass is the answer to the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions