-
Notifications
You must be signed in to change notification settings - Fork 210
[OCPBUGS-57585]CVO protects /metrics with kube-rbac-proxy #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
[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 |
3da6cef to
b9f75bc
Compare
b9f75bc to
834d079
Compare
|
/retest |
|
/cc |
|
/retest |
98970c2 to
4da6ccc
Compare
|
/retest |
The cluster bot job:
$ 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 |
|
In favour of #1215 |
|
@hongkailiu: The following tests failed, say
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. |

This pull adds kube-rbac-proxy as a sidecar in the CVO pod which allows only HTTPS requests to the
/metricsendpoint 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-certandservice-caare taken from existingvolumes.secret-kube-rbac-proxy-metricis from the introduced secretopenshift-cluster-version-kube-rbac-proxy-metric.Since proxy servers HTTPS, CVO servers only HTTP request.
I'm not changing
--listenin 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
9099port 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 hashostNetwork: true. We learn this from node-exporter.