cert-manager-operator icon indicating copy to clipboard operation
cert-manager-operator copied to clipboard

openshift.io/cluster-monitoring incorrectly set as annotation instead of a label

Open pstefka opened this issue 1 month ago • 0 comments

According to the OCP docs, if cluster monitoring should scrape a namespace, label openshift.io/cluster-monitoring: "true" should be set.

Openshifts's Cert manager operator however incorrectly sets an annotation openshift.io/cluster-monitoring: "true" instead of a label:

apiVersion: v1
kind: Namespace
metadata:
  annotations:
    openshift.io/cluster-monitoring: "true"
    ...
  creationTimestamp: "2025-10-24T11:36:25Z"
  labels:
    kubernetes.io/metadata.name: cert-manager
    pod-security.kubernetes.io/audit: restricted
    pod-security.kubernetes.io/audit-version: latest
    pod-security.kubernetes.io/warn: restricted
    pod-security.kubernetes.io/warn-version: latest
  name: cert-manager
  resourceVersion: "86164062"
  uid: e0f7b893-2732-4de8-b253-302098bc74b1
spec:
  finalizers:
  - kubernetes
status:
  phase: Active

Checked with 1.15.1, and 1.17.0 with the same result.

pstefka avatar Oct 24 '25 11:10 pstefka