Skip to content

Conversation

@hongkailiu
Copy link
Member

@hongkailiu hongkailiu commented Jul 22, 2025

This pull adds kube-rbac-proxy as a sidecar in the CVO pod which allows only HTTPS requests to the /metrics endpoint for the Prometheus service account from OpenShift monitoring.

See https://rhobs-handbook.netlify.app/products/openshiftmonitoring/collecting_metrics.md/#kube-rbac-proxy-sidecar for details.

The sidecar has three volumeMounts:

  • serving-cert and service-ca are taken from existing volumes.
  • secret-kube-rbac-proxy-metric is from the introduced secret openshift-cluster-version-kube-rbac-proxy-metric.

Since proxy servers HTTPS, CVO servers only HTTP request.

I'm not changing --listen in the bootstrap manifest, because we don't need to serve metrics then (it's long before we have Prometheus around to scrape us).

The proxy container serves listens to the 9099 port of the pod's IP which was for the CVO container. The latter now listens to the same port of the loopback address (127.0.0.1) since CVO has hostNetwork: true. We learn this from node-exporter.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongkailiu

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

The pull request process is described 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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2025
@hongkailiu
Copy link
Member Author

/retest

@petr-muller
Copy link
Member

/cc

@openshift-ci openshift-ci bot requested a review from petr-muller July 22, 2025 12:00
@hongkailiu
Copy link
Member Author

/retest

@hongkailiu
Copy link
Member Author

/retest

@hongkailiu
Copy link
Member Author

hongkailiu commented Jul 22, 2025

launch 4.20,openshift/cluster-version-operator#1214 gcp,single-node

The cluster bot job:
https://prow.ci.openshift.org/view/gs/test-platform-results/logs/release-openshift-origin-installer-launch-gcp-modern/1947749334703411200

Screenshot 2025-07-22 at 15 46 19
$ oc debug node/ci-ln-444hbxt-72292-26f5g-master-0
Starting pod/ci-ln-444hbxt-72292-26f5g-master-0-debug-gf24s ...
To use host binaries, run `chroot /host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.
Pod IP: 10.0.0.4
If you don't see a command prompt, try pressing enter.
sh-5.1# chroot /host
sh-5.1# curl -k https://10.0.0.4:9099/metrics
Unauthorized

@hongkailiu
Copy link
Member Author

In favour of #1215

@hongkailiu hongkailiu closed this Jul 22, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 22, 2025

@hongkailiu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-hypershift 4da6ccc link true /test e2e-hypershift
ci/prow/e2e-agnostic-operator-devpreview 4da6ccc link false /test e2e-agnostic-operator-devpreview
ci/prow/e2e-hypershift-conformance 4da6ccc link true /test e2e-hypershift-conformance

Full PR test history. Your PR dashboard.

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants