-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: simplify RBAC structure and fix bundle multi-namespace support #151
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
refactor: simplify RBAC structure and fix bundle multi-namespace support #151
Conversation
c9df602 to
b43eab0
Compare
|
/retest |
1 similar comment
|
/retest |
|
/test operator-lifecycle-verify |
|
Tested manually and the result is as expected:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could kustomization.yaml also use the sed | kubectl apply pattern so the worktree remains clean (cf. #124)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into it, and it seems that for kubectl apply -k we cannot read kustomization.yaml from stdin, so using sed | kubectl apply -k - is not possible.
Since the patches for the ClusterRoleBindings need to be defined inside kustomization.yaml, we still need the file in a directory. To keep the worktree clean, we could either use a temporary directory or restore the file after applying, but the current approach using yq -i works correctly and is simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I'm in favour of having a kustomization.yaml.in file that yq reads from and creates kustomization.yaml out-of-place. kustomization.yaml should then be git-ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, Thanks
b43eab0 to
4d44185
Compare
9bbc232 to
f0d28b7
Compare
Commit da9a383 added base/overlays structure for multi-namespace support but only worked for direct install. This simplifies the structure and fixes bundle installations. Changes: - Flatten RBAC: config/rbac/base/* → config/rbac/ - Remove overlays (both platforms now use same RBAC) - Move SCC to config/openshift/scc.yaml with <NAMESPACE> placeholders - Add metrics-auth to CSV clusterPermissions for OLM hash-based naming - Remove hardcoded namespaces from RoleBindings (OLM auto-injects) - Template kind/*.yaml services with <NAMESPACE> placeholders - Use sed substitution for SCC and port-forward services - Convert kustomization.yaml → kustomization.yaml.in template with NAMESPACE placeholders - Replace 3 yq commands with single sed substitution in Makefile - Add /config/rbac/kustomization.yaml to .gitignore (now generated file) Multi-namespace now works for both direct install and OLM bundle by: - OLM creating unique ClusterRole/ClusterRoleBinding names per namespace - Each namespace getting its own SCC via sed substitution - No resource conflicts between operator instances Signed-off-by: Yalan Zhang <[email protected]>
f0d28b7 to
e9f98a8
Compare
ae1fd61 to
799fdcd
Compare
Update bundle to include the attestation-key-register service and AttestationKey CRD introduced in commit 2ea74dc. - Add attestation-key-register to CSV relatedImages and alm-examples - Update bundle generation script to handle ATTESTATION_KEY_REGISTER_IMAGE - Add AttestationKey RBAC viewer and admin roles - Update README with new component documentation Signed-off-by: Yalan Zhang <[email protected]>
799fdcd to
36f395a
Compare
|
@yalzhang: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alicefr, Jakob-Naucke, yalzhang The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
c0463d7
into
trusted-execution-clusters:main
Commit da9a383 added base/overlays structure for multi-namespace support but only worked for direct install. This simplifies the structure and fixes bundle installations.
Changes:
Multi-namespace now works for both direct install and OLM bundle by: