Skip to content

ROX-22289: drop kube-rbac-proxy sidecar#9808

Merged
porridge merged 4 commits intomasterfrom
porridge/ROX-22289-drop
Feb 8, 2024
Merged

ROX-22289: drop kube-rbac-proxy sidecar#9808
porridge merged 4 commits intomasterfrom
porridge/ROX-22289-drop

Conversation

@porridge
Copy link
Copy Markdown
Contributor

@porridge porridge commented Feb 7, 2024

Description

Its functionality is now built into the controller-runtime library, so the manager can serve the metrics endpoint directly. This lets us get rid of a dependency that proved to be problematic (see ticket's parent for more background) and make a tiny dent in operator pod's RAM/CPU needs.

AFAICT the go.mod changes are a result of importing "sigs.k8s.io/controller-runtime/pkg/metrics/filters" which has additional dependencies.

I hope making --replace-rbac-proxy in the patch-csv.py script into a no-op is a reasonable migration strategy, @msugakov ? Additional downstream cleanup will be tracked in ROX-22355.

Checklist

This change should be transparent to users.

Testing Performed

Here I tell how I validated my change

CI should be enough with the recently added metrics test mentioned above.

As requested by @msugakov I also did a manual test following these instructions (make manifests bundle after uncommenting the prometheus line, to obtain the ServiceMonitor definition in step one).

This works as expected:

Screenshot from 2024-02-08 15-57-46

Reminder for reviewers

In addition to reviewing code here, reviewers must also review testing and request further testing in case the
performed one does not seem sufficient. As a reviewer, you must not approve the change until you understand the
performed testing and you are satisfied with it.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Feb 7, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 7, 2024

/test gke-operator-e2e-tests
/test ocp-4-11-operator-e2e-tests
/test ocp-4-14-operator-e2e-tests

@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Feb 7, 2024

Images are ready for the commit at a19dc2d.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.3.x-1068-ga19dc2d064.

@porridge porridge force-pushed the porridge/ROX-22289-drop branch from deec83c to 2858729 Compare February 7, 2024 10:17
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a53ece9) 47.65% compared to head (caa9596) 47.64%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9808      +/-   ##
==========================================
- Coverage   47.65%   47.64%   -0.01%     
==========================================
  Files        2468     2468              
  Lines      167575   167575              
==========================================
- Hits        79853    79847       -6     
- Misses      81135    81139       +4     
- Partials     6587     6589       +2     
Flag Coverage Δ
go-unit-tests 47.64% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@porridge porridge force-pushed the porridge/ROX-22289-drop branch from 2858729 to cfdc6e4 Compare February 7, 2024 11:38
@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 7, 2024

/test gke-operator-e2e-tests
/test ocp-4-11-operator-e2e-tests
/test ocp-4-14-operator-e2e-tests

@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 7, 2024

/retest

1 similar comment
@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 7, 2024

/retest

@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 7, 2024

/test gke-operator-e2e-tests
/test ocp-4-11-operator-e2e-tests
/test ocp-4-14-operator-e2e-tests

@porridge porridge force-pushed the porridge/ROX-22289-drop branch from cfdc6e4 to 97f3c2c Compare February 8, 2024 06:16
@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 8, 2024

/test gke-operator-e2e-tests
/test ocp-4-11-operator-e2e-tests
/test ocp-4-14-operator-e2e-tests

@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 8, 2024

/test gke-operator-e2e-tests
/test ocp-4-11-operator-e2e-tests
/test ocp-4-14-operator-e2e-tests

@porridge porridge marked this pull request as ready for review February 8, 2024 11:15
@porridge porridge requested a review from a team February 8, 2024 11:15
Copy link
Copy Markdown
Contributor

@msugakov msugakov left a comment

Choose a reason for hiding this comment

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

Thank you, this is great!

Having tests #9773 created before the change and used to test the change is even more awesome.

That said, I wasn't able to fully draw a parallel between tests that you implemented and what I had to do to see metrics flowing in OCP built-in Prometheus. I described that here.
Do you mind trying that as a manual test to confirm the metrics appear in OCP console?

@porridge
Copy link
Copy Markdown
Contributor Author

porridge commented Feb 8, 2024

That said, I wasn't able to fully draw a parallel between tests that you implemented and what I had to do to see metrics flowing in OCP built-in Prometheus. I described that here. Do you mind trying that as a manual test to confirm the metrics appear in OCP console?

Done, screenshot added to PR description.

@porridge porridge enabled auto-merge (squash) February 8, 2024 15:04
@porridge porridge merged commit fe7db97 into master Feb 8, 2024
@porridge porridge deleted the porridge/ROX-22289-drop branch February 8, 2024 15:59
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Feb 8, 2024

@porridge: The following test 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/ocp-4-11-scanner-v4-tests a19dc2d link false /test ocp-4-11-scanner-v4-tests

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/test-infra 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants