Skip to content

Conversation

@tmshort
Copy link
Contributor

@tmshort tmshort commented Jan 12, 2026

The PSM was using controller-runtime for health/metrics and using kube-rbac-proxy for TLS support. This removes the kube-rbac-proxy and implements the health/metrics servers using the same code that the OLM and Catalog controllers use.

This also adds TLS configuration flags identical to those used for OLM and Catalog operators.

This will make updating the PSM for OpenShift TLS Profiles significantly easier, as code can be shared between all the operators.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 12, 2026
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2026
@tmshort tmshort force-pushed the rm-krp branch 3 times, most recently from 64fe5e3 to c01c431 Compare January 19, 2026 14:59
@tmshort tmshort changed the title WIP: Remove kube-rbac-proxy from PSM OPRUN-4416: Remove kube-rbac-proxy from PSM Jan 19, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 19, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 19, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 19, 2026

@tmshort: This pull request references OPRUN-4416 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 19, 2026

@tmshort: This pull request references OPRUN-4416 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

he PSM was using controller-runtime for health/metrics and using
kube-rbac-proxy for TLS support. This removes the kube-rbac-proxy
and implements the health/metrics servers using the same code
that the OLM and Catalog controllers use.

This also adds TLS configuration flags identical to those used for
OLM and Catalog operators.

This will make updating the PSM for OpenShift TLS Profiles
significantly easier, as code can be shared between all the operators.

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 19, 2026

@tmshort: This pull request references OPRUN-4416 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

he PSM was using controller-runtime for health/metrics and using kube-rbac-proxy for TLS support. This removes the kube-rbac-proxy and implements the health/metrics servers using the same code that the OLM and Catalog controllers use.

This also adds TLS configuration flags identical to those used for OLM and Catalog operators.

This will make updating the PSM for OpenShift TLS Profiles significantly easier, as code can be shared between all the operators.

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 20, 2026

@tmshort: This pull request references OPRUN-4416 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

The PSM was using controller-runtime for health/metrics and using kube-rbac-proxy for TLS support. This removes the kube-rbac-proxy and implements the health/metrics servers using the same code that the OLM and Catalog controllers use.

This also adds TLS configuration flags identical to those used for OLM and Catalog operators.

This will make updating the PSM for OpenShift TLS Profiles significantly easier, as code can be shared between all the operators.

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.

@bandrade
Copy link
Contributor

/label qe-approved
/verified by @bandrade

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jan 20, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 20, 2026

@tmshort: This pull request references OPRUN-4416 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

The PSM was using controller-runtime for health/metrics and using kube-rbac-proxy for TLS support. This removes the kube-rbac-proxy and implements the health/metrics servers using the same code that the OLM and Catalog controllers use.

This also adds TLS configuration flags identical to those used for OLM and Catalog operators.

This will make updating the PSM for OpenShift TLS Profiles significantly easier, as code can be shared between all the operators.

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.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 20, 2026
@openshift-ci-robot
Copy link

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

Details

In response to this:

/label qe-approved
/verified by @bandrade

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.

defaultMetricsPort = "0"
defaultHealthCheckPort = ":8080"
defaultMetricsPort = "0" // Disable controller-runtime metrics (using pkg/lib/server instead)
defaultHealthCheckPort = "" // Disable controller-runtime health (using pkg/lib/server instead)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the same port? Or did we change that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to use a different server at port 8443.

httpGet:
path: /healthz
port: 8080
port: 8443
Copy link
Contributor

Choose a reason for hiding this comment

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

I see we changed.
That I do not know if is an issue.
Could someone be using the port? Breaking change?

Copy link
Contributor Author

@tmshort tmshort Jan 21, 2026

Choose a reason for hiding this comment

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

This ends up being the same external port. Because kube-rbac-proxy was translating 8080 <-> 8443
EDIT: The upstream port was 9090, the original health ones were 8080, I don’t think it will make a difference since these ports were never referenced explicitly, but discovered.

Copy link
Contributor

Choose a reason for hiding this comment

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

we have the Prometheus metrics configuration
Will not that break it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The metrics port was previous exposed as 8443, and that remains. It used to go through the kube-rbac-proxy, and now goes directly to PSM. The Health and Liveness ports are auto-discovered.

tolerationSeconds: 120
volumes:
- name: package-server-manager-serving-cert
- name: srv-cert
Copy link
Member

Choose a reason for hiding this comment

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

It seems the same secret, but we mount it twice. Is it as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, now it's only mounted once (using the original name)
It will need to be re-verified.

@jianzhangbjz
Copy link
Member

Test passed.

1. Build an OCP with this unmerged PR via the cluster-bot
launch 4.22,openshift/operator-framework-olm#1190 aws

jiazha-mac:~ jiazha$ oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-01-21-095004-test-ci-ln-2khk0j2-latest   True        False         6m53s   Cluster version is 4.22.0-0-2026-01-21-095004-test-ci-ln-2khk0j2-latest

2. Check PSM pod, no kube-rbac-proxy container
jiazha-mac:~ jiazha$ oc get pods -n openshift-operator-lifecycle-manager -l app=package-server-manager
NAME                                      READY   STATUS    RESTARTS   AGE
package-server-manager-66cfc57885-cc8rt   1/1     Running   0          37m

jiazha-mac:~ jiazha$ oc get pod package-server-manager-66cfc57885-cc8rt -n openshift-operator-lifecycle-manager -o jsonpath='{.spec.containers[*].name}'
package-server-manager

3. Check PSM metrics
jiazha-mac:~ jiazha$ token=`oc create token prometheus-k8s -n openshift-monitoring`

jiazha-mac:~ jiazha$ oc get service
NAME                             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
catalog-operator-metrics         ClusterIP   172.30.154.101   <none>        8443/TCP   47m
olm-operator-metrics             ClusterIP   172.30.84.136    <none>        8443/TCP   47m
package-server-manager-metrics   ClusterIP   172.30.79.18     <none>        8443/TCP   47m
packageserver-service            ClusterIP   172.30.255.148   <none>        5443/TCP   41m

jiazha-mac:~ jiazha$ oc create  route reencrypt psm-metrics --service package-server-manager-metrics  --port=metrics
route.route.openshift.io/psm-metrics created
jiazha-mac:~ jiazha$ 
jiazha-mac:~ jiazha$ oc get route
NAME          HOST/PORT                                                                                          PATH   SERVICES                         PORT      TERMINATION   WILDCARD
psm-metrics   psm-metrics-openshift-operator-lifecycle-manager.apps.ci-ln-2khk0j2-76ef8.aws-4.ci.openshift.org          package-server-manager-metrics   metrics   reencrypt     None

jiazha-mac:~ jiazha$ curl -k -H "Authorization: Bearer $(echo $token)" https://psm-metrics-openshift-operator-lifecycle-manager.apps.ci-ln-2khk0j2-76ef8.aws-4.ci.openshift.org/metrics |grep metric
...
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 133
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

@jianzhangbjz
Copy link
Member

/verified by @jianzhangbjz

@openshift-ci-robot
Copy link

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

Details

In response to this:

/verified by @jianzhangbjz

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.

The PSM was using controller-runtime for health/metrics and using
kube-rbac-proxy for TLS support. This removes the kube-rbac-proxy
and implements the health/metrics servers using the same code
that the OLM and Catalog controllers use.

This also adds TLS configuration flags identical to those used for
OLM and Catalog operators.

This will make updating the PSM for OpenShift TLS Profiles
significantly easier, as code can be shared between all the operators.

Signed-off-by: Todd Short <todd.short@me.com>
Assisted-by: Claude code
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jan 21, 2026
Copy link
Contributor

@camilamacedo86 camilamacedo86 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 Jan 21, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 21, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, tmshort

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
Copy link
Contributor

openshift-ci bot commented Jan 21, 2026

@tmshort: 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.

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. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants