tests: Add the recording RBAC roles and SA dynamically, re-add on every operator redeploy
What type of PR is this?
/kind bug /kind failing-test
What this PR does / why we need it:
No idea why we didn't catch this before when running the RBAC roles and SA on OCP before, but redeploying the operator wouldn't re-add the RBAC role, role binding and the SA required to grant the ability to use the SCC needed to record replicated controllers.
This patch adds the needed manifests as part of deploying the operator.
Note that most of the code is only executed on OCP, on other distros, only the SA is added so that we can always reference the SA regardless of the distribution.
Which issue(s) this PR fixes:
None
Does this PR have test?
N/A
Special notes for your reviewer:
N/A
Does this PR introduce a user-facing change?
NONE
/hold for some reason the tests work fine for me locally, wtf. Submitted some extra debugging and marking as hold
Codecov Report
Merging #1016 (31765ad) into main (3d7d017) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## main #1016 +/- ##
=======================================
Coverage 50.43% 50.43%
=======================================
Files 42 42
Lines 4761 4761
=======================================
Hits 2401 2401
Misses 2281 2281
Partials 79 79
/hold cancel
this PR now superseded PR #1015
@saschagrunert can you review this PR, please?
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: JAORMX, jhrozek, saschagrunert
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [JAORMX,jhrozek,saschagrunert]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment