Cert-manager: Prometheus Operator's ServiceMonitor not functional

Created on 5 Aug 2019  路  3Comments  路  Source: jetstack/cert-manager

Describe the bug:
Prometheus Operator is unable to scrape metrics from cert-manager because there is no cert-manager Service resource.

Expected behaviour:
When cert-manager is deployed via helm with prometheus.serviceMonitor.enabled = true, Prometheus Operator should be able to use the deployed ServiceMonitor custom resource to scrape metrics with Prometheus.

Steps to reproduce the bug:
Install cert-manager is deployed via helm with prometheus.serviceMonitor.enabled = true. Visit Prometheus' service discovery dashboard (eg at something like: http://prometheus-service:9090/service-discovery#job-cert-manager%2fcert-manager%2f0 ). Notice that no targets are matched for cert-manager.

Anything else we need to know?:
Prometheus Operator's ServiceMonitors use their selector's matchLabels to search for matching Services (as opposed to Pods). Currently, the helm chart does not create a Service for cert-manager so there is nothing for the ServiceMonitor to find and so Prometheus can't scrape any metrics. When I manually added the following Service to the cert-manager Namespace, Prometheus immediately started correctly scraping metrics:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: cert-manager
  name: cert-manager
  namespace: cert-manager
spec:
  ports:
  - port: 9402
    protocol: TCP
    targetPort: 9402
  selector:
    app: cert-manager

Environment details::

  • Kubernetes version (e.g. v1.10.2): v1.13.7-gke.8
  • Cloud-provider/provisioner (e.g. GKE, kops AWS, etc): GKE
  • cert-manager version (e.g. v0.4.0): v0.9.0
  • Install method (e.g. helm or static manifests): helm

/kind bug

kinbug

All 3 comments

This has been accowledged and fixed in #1942, sorry for the inconvenience. This will be a part of the next release of cert-manager.

Maybe @munnerz can comment on if there will be a v0.9.1 patch release or if we have to wait for 0.10 to ship.

Unfortunately this was not a part of the v0.9.1 release, maybe @munnerz can shed some light on what release #1942 will be a part of.

@Starefossen this should now be included as part of the v0.10 release, and we've also recently enabled automation that will automatically add milestones to PRs to indicate what release they are expected to land in to make this clearer in future 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbouzekri picture jbouzekri  路  4Comments

munjal-patel picture munjal-patel  路  3Comments

Azylog picture Azylog  路  3Comments

dontreboot picture dontreboot  路  3Comments

f-f picture f-f  路  4Comments