Skip to content

NO-JIRA: use scrape class which is more succinct#1365

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
hongkailiu:scrapeClass
Apr 1, 2026
Merged

NO-JIRA: use scrape class which is more succinct#1365
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
hongkailiu:scrapeClass

Conversation

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 31, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@hongkailiu: This pull request explicitly references no jira issue.

Details

In response to this:

This is suggested in [1]. "monitoring" has done it to their ServiceMonitors [2] with [3].

[1]. https://rhobs-handbook.netlify.app/products/openshiftmonitoring/collecting_metrics.md/#configuring-prometheus-to-scrape-metrics

[2]. https://github.com/openshift/cluster-monitoring-operator/blob/c6bac82b735ac3a5ee67a3899d1a24bf95ae7277/assets/prometheus-operator/service-monitor.yaml#L20

[3]. openshift/cluster-monitoring-operator#2492

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94b63a42-b575-4600-9608-dd76a4f0c44c

📥 Commits

Reviewing files that changed from the base of the PR and between bb70c3b and 2f9f391.

📒 Files selected for processing (1)
  • install/0000_90_cluster-version-operator_02_servicemonitor.yaml

Walkthrough

A ServiceMonitor configuration file was updated to replace explicit TLS certificate file references (caFile, certFile, keyFile) with a declarative scrapeClass field for TLS client certificate authentication, reducing configuration verbosity.

Changes

Cohort / File(s) Summary
ServiceMonitor TLS Configuration
install/0000_90_cluster-version-operator_02_servicemonitor.yaml
Removed three tlsConfig file path fields and added scrapeClass: tls-client-certificate-auth for declarative TLS authentication management.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2026
@hongkailiu
Copy link
Copy Markdown
Member Author

/retest

@hongkailiu
Copy link
Copy Markdown
Member Author

/hold

I cannot verify it up to https://redhat.atlassian.net/browse/OCPBUGS-78579

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 31, 2026
@hongkailiu
Copy link
Copy Markdown
Member Author

Then I tried it with a 4.21 job:

launch 4.21,openshift/cluster-version-operator#1365 aws,single-node

and

$ oc get servicemonitor -n openshift-cluster-version cluster-version-operator -o yaml | yq -y .spec
endpoints:
  - interval: 30s
    port: metrics
    scheme: https
    tlsConfig:
      serverName: cluster-version-operator.openshift-cluster-version.svc
namespaceSelector:
  matchNames:
    - openshift-cluster-version
scrapeClass: tls-client-certificate-auth
selector:
  matchLabels:
    k8s-app: cluster-version-operator

Checked one of CVO metrics:

Screenshot 2026-03-31 at 16 58 06

/verified by @hongkailiu

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 31, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@hongkailiu: This PR has been marked as verified by @hongkailiu.

Details

In response to this:

Then I tried it with a 4.21 job:

launch 4.21,openshift/cluster-version-operator#1365 aws,single-node

and

$ oc get servicemonitor -n openshift-cluster-version cluster-version-operator -o yaml | yq -y .spec
endpoints:
 - interval: 30s
   port: metrics
   scheme: https
   tlsConfig:
     serverName: cluster-version-operator.openshift-cluster-version.svc
namespaceSelector:
 matchNames:
   - openshift-cluster-version
scrapeClass: tls-client-certificate-auth
selector:
 matchLabels:
   k8s-app: cluster-version-operator

Checked one of CVO metrics:

Screenshot 2026-03-31 at 16 58 06

/verified by @hongkailiu

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.

@hongkailiu
Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 31, 2026
@hongkailiu
Copy link
Copy Markdown
Member Author

/retest

Copy link
Copy Markdown
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 31, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongkailiu, wking

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

The pull request process is described here

Details 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-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD bb70c3b and 2 for PR HEAD 2f9f391 in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 1, 2026

@hongkailiu: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit e1832cc into openshift:main Apr 1, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants