Skip to content

Conversation

@lance5890
Copy link
Contributor

  1. When we run kubectl get ServiceMonitor -n openshift-etcd-operator, we can see both etcd and etcd-minimal exist.
    [root@provisioning ~]# kubectl get ServiceMonitor -n openshift-etcd-operator
    NAME AGE
    etcd 99d
    etcd-minimal 99d
    etcd-operator 99d

  2. The monitoring.openshift.io/collection-profile annotation is used by the Cluster Monitoring Operator (CMO), as shown in the source code: https://github.com/openshift/cluster-monitoring-operator/blob/289e250e6b7f70c546caf0be8a9fb507a2becc06/pkg/manifests/manifests.go#L1381

  3. However, the Cluster Etcd Operator (CEO) does not recognize the monitoring.openshift.io/collection-profile annotation to determine which ServiceMonitor to apply (minimal or full).

  4. Therefore, I propose removing the etcd-minimal ServiceMonitor and keeping only the full etcd ServiceMonitor.

related PR:
#1070
openshift/cluster-monitoring-operator#2039

@coderabbitai
Copy link

coderabbitai bot commented Oct 15, 2025

Walkthrough

Removed the etcd minimal ServiceMonitor manifest, dropped a label from the full ServiceMonitor, and updated the operator starter to stop bundling the deleted minimal manifest. No other logic or fields changed.

Changes

Cohort / File(s) Summary
Etcd ServiceMonitor manifests
bindata/etcd/minimal-sm.yaml, bindata/etcd/sm.yaml
Deleted minimal-sm.yaml ServiceMonitor. In sm.yaml, removed label monitoring.openshift.io/collection-profile: full.
Operator starter static resources
pkg/operator/starter.go
Removed reference to etcd/minimal-sm.yaml from static resource bundle initialization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the main change of the pull request, specifically the removal of the redundant minimal etcd ServiceMonitor, and it is clear and specific enough for a reviewer to understand the primary focus at a glance.
Description Check ✅ Passed The description clearly explains why the minimal etcd ServiceMonitor is redundant, references the existing ServiceMonitors and annotation usage, and outlines the rationale for its removal, directly matching the changes made in the pull request.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 3b399a9 and 1bf8f19.

📒 Files selected for processing (3)
  • bindata/etcd/minimal-sm.yaml (0 hunks)
  • bindata/etcd/sm.yaml (0 hunks)
  • pkg/operator/starter.go (0 hunks)
💤 Files with no reviewable changes (3)
  • pkg/operator/starter.go
  • bindata/etcd/minimal-sm.yaml
  • bindata/etcd/sm.yaml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from dusk125 and jubittajohn October 15, 2025 01:29
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 15, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lance5890
Once this PR has been reviewed and has the lgtm label, please assign hasbro17 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

Hi @lance5890. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 kubernetes-sigs/prow repository.

labels:
app.kubernetes.io/name: etcd
k8s-app: etcd
monitoring.openshift.io/collection-profile: full
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ceo does not recognize this annotation

@tjungblu
Copy link
Contributor

@simonpasquier / @machine424 is it safe to delete? or did we make the mistake to not honor some global configuration? I assume this was used to reduce the amount of metrics going to Prometheus in CMO at some point in time.

@machine424
Copy link
Contributor

Although both service monitors are present, only one should be considered (labels are used to select the appropriate one based on the profile. The selection is handled by the monitoring stack (prometheus-operator), CEO doesn't have to know about that.)
Are you seeing duplicate metrics in prometheus?

@tjungblu
Copy link
Contributor

I defer this to @lance5890 - I assume he just cleaned it up based on being unused here

@lance5890
Copy link
Contributor Author

@lance5890 lance5890 closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants