Skip to content

OCPSTRAT-1852: Address review feedback for hosted control plane metrics enhancement#1948

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:masterfrom
csrwng:hosted-cluster-metrics-followup-2
Mar 12, 2026
Merged

OCPSTRAT-1852: Address review feedback for hosted control plane metrics enhancement#1948
openshift-merge-bot[bot] merged 2 commits intoopenshift:masterfrom
csrwng:hosted-cluster-metrics-followup-2

Conversation

@csrwng
Copy link
Copy Markdown
Contributor

@csrwng csrwng commented Feb 25, 2026

Summary

  • Switch authentication from bearer token + TokenReview to mTLS client certificate verification using the existing metrics-client-certs and cluster-signer-ca infrastructure
  • Use honorLabels: true on PodMonitor endpoints instead of metricRelabelings to handle label conflicts between proxy-injected and target labels
  • Fix imprecise source_pod references to use the standard pod label
  • Update user story to reference AlertingRule CRs and user-defined monitoring instead of PrometheusRule

Test plan

  • Verify mTLS authentication section accurately describes the metrics-client-certs CSR flow and cluster-signer-ca verification
  • Verify PodMonitor YAML example uses honorLabels: true and tlsConfig with client cert references
  • Verify no stale source_pod, bearerTokenFile, or TokenReview references remain in active design sections
  • Verify alternatives section correctly documents TokenReview as a rejected approach

🤖 Generated with Claude Code

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

openshift-ci-robot commented Feb 25, 2026

@csrwng: This pull request references OCPSTRAT-1852 which is a valid jira issue.

Details

In response to this:

Summary

  • Switch authentication from bearer token + TokenReview to mTLS client certificate verification using the existing metrics-client-certs and cluster-signer-ca infrastructure
  • Use honorLabels: true on PodMonitor endpoints instead of metricRelabelings to handle label conflicts between proxy-injected and target labels
  • Fix imprecise source_pod references to use the standard pod label
  • Update user story to reference AlertingRule CRs and user-defined monitoring instead of PrometheusRule

Test plan

  • Verify mTLS authentication section accurately describes the metrics-client-certs CSR flow and cluster-signer-ca verification
  • Verify PodMonitor YAML example uses honorLabels: true and tlsConfig with client cert references
  • Verify no stale source_pod, bearerTokenFile, or TokenReview references remain in active design sections
  • Verify alternatives section correctly documents TokenReview as a rejected approach

🤖 Generated with Claude Code

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.

- Switch authentication from bearer token + TokenReview to mTLS client
  certificate verification using the existing metrics-client-certs and
  cluster-signer-ca infrastructure
- Use honorLabels: true on PodMonitor endpoints instead of metricRelabelings
  to handle label conflicts between proxy-injected and target labels
- Fix imprecise source_pod references to use the standard pod label
- Update user story to reference AlertingRule CRs and user-defined monitoring
  instead of PrometheusRule

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@csrwng csrwng force-pushed the hosted-cluster-metrics-followup-2 branch from 8dde61b to f96b5ce Compare February 25, 2026 20:08
@csrwng
Copy link
Copy Markdown
Contributor Author

csrwng commented Feb 25, 2026

@jan--f ptal

@enxebre
Copy link
Copy Markdown
Member

enxebre commented Feb 25, 2026

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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 openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2026
CSR controller when it reaches 20-25% remaining lifetime.
2. The `metrics-client-certs` Secret is already mounted into the Prometheus pod
at `/etc/prometheus/secrets/metrics-client-certs/` (containing `tls.crt` and
`tls.key`). The PodMonitor's `tlsConfig` references these paths for client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call, updated the PodMonitor to use scrapeClass: tls-client-certificate-auth and simplified the tlsConfig to only serverName. Also updated the prose in the authentication flow and HCCO resource descriptions to reflect this.

keySecret:
name: metrics-client-certs
key: tls.key
serverName: <metrics-proxy-route-hostname>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

using scrapeClass we should only need serverName.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, removed ca, cert, and keySecret from the tlsConfig — only serverName remains now.

Leverage CMO's tls-client-certificate-auth scrape class to inject client
cert/key and CA automatically, simplifying the PodMonitor's tlsConfig to
only require serverName.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@muraee
Copy link
Copy Markdown

muraee commented Mar 12, 2026

/lgtm

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

openshift-ci Bot commented Mar 12, 2026

@csrwng: 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 d69af05 into openshift:master Mar 12, 2026
2 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants