CM-1112: Fix cluster-monitoring set as annotation instead of label#437
CM-1112: Fix cluster-monitoring set as annotation instead of label#437sebrandon1 wants to merge 1 commit into
Conversation
|
@sebrandon1: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe cert-manager Namespace manifest and its embedded bindata asset apply openshift.io/cluster-monitoring: "true" as a metadata label instead of an annotation; both source YAML and generated asset were updated accordingly. ChangesCluster-monitoring label correction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sebrandon1: This pull request references CM-1112 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
The openshift.io/cluster-monitoring key was incorrectly set as an annotation on the cert-manager namespace instead of a label. OpenShift cluster monitoring requires this to be a label in order to scrape metrics from the namespace. Fixes openshift#336
ac82e42 to
f7307e6
Compare
|
@sebrandon1: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
openshift.io/cluster-monitoring: "true"fromannotationstolabelson thecert-managernamespace manifestbindata.goto matchPer the OCP docs, cluster monitoring requires the
openshift.io/cluster-monitoring: "true"key to be set as a label on the namespace. The operator was incorrectly setting it as an annotation, which prevented Prometheus from discovering the namespace for metrics scraping.Note on existing clusters: The operator's static resource controller (library-go
EnsureObjectMeta) merges labels additively. On upgrade, the label will be added but the old annotation will remain. This is harmless — monitoring only checks for the label.Cluster verification (OCP 4.19)
Before — label missing, only annotation set:
After — label correctly set:
The old annotation remains on existing clusters (additive merge), which is harmless:
Fixes #336
Test plan
make test)Summary by CodeRabbit