CMP-4496: Add NetworkPolicy RBAC for operands to operator Role and CSV - #1313
Conversation
|
@taimurhafeez: This pull request references CMP-4496 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 "5.0.0" version, but no target version was set. DetailsIn 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: taimurhafeez The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
/retest-required |
a852f8f to
529958f
Compare
|
🤖 To deploy this PR, run the following command: |
What
networking.k8s.io/networkpoliciesRBAC rule (verbs:create,delete,get,update) to the operator Role (config/rbac/operator_role.yaml)config/manifests/bases/compliance-operator.clusterserviceversion.yaml) under thecompliance-operatorservice accountcompliancescan_controller.goto keep the three RBAC sources of truth in syncmake bundleWhy
The Conforma policy
olm.required_network_policy_rbac_for_operandsrequires the CSV to declare RBAC permissions fornetworking.k8s.io/networkpolicieswith verbscreate,delete, andupdate(orpatch).Test plan
Prerequisites
compliance-operator,compliance-operator-bundle, andcompliance-operator-catalog1. Build and push images
2. Deploy via OLM
3.Verify OLM installation is complete
4. Verify NetworkPolicy RBAC in the OLM-created Role
Check the OLM-created Role contains the networkpolicies rule
oc get roles -n openshift-compliance -o yaml | grep -B 2 -A 6 networkpoliciesExpected output:
5. Verify the CSV permissions section
Expected output should show
networkpolicieswith verbscreate,delete,get,updateunder thepermissions(namespace-scoped) section.6. Verify SA has the permissions