diff --git a/deploy/charts/cert-manager/templates/service.yaml b/deploy/charts/cert-manager/templates/service.yaml index 112a55228..3d5df905e 100644 --- a/deploy/charts/cert-manager/templates/service.yaml +++ b/deploy/charts/cert-manager/templates/service.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.servicemonitor.enabled }} +{{- if and .Values.prometheus.enabled (not .Values.prometheus.podmonitor.enabled) }} apiVersion: v1 kind: Service metadata: diff --git a/deploy/charts/cert-manager/values.yaml b/deploy/charts/cert-manager/values.yaml index 731cb5772..18bab1af7 100644 --- a/deploy/charts/cert-manager/values.yaml +++ b/deploy/charts/cert-manager/values.yaml @@ -421,7 +421,9 @@ enableServiceLinks: false prometheus: # Enable Prometheus monitoring for the cert-manager controller to use with the # Prometheus Operator. If this option is enabled without enabling `prometheus.servicemonitor.enabled` or - # `prometheus.podmonitor.enabled`, 'prometheus.io' annotations are added to the cert-manager Deployment resources. + # `prometheus.podmonitor.enabled`, 'prometheus.io' annotations are added to the cert-manager Deployment + # resources. Additionally, for backwards compatibility a service is created which can be used together + # with your own ServiceMonitor (managed outside of this Helm chart). # Otherwise, a ServiceMonitor/ PodMonitor is created. enabled: true