fix(manifests): wire ambient-control-plane-rbac.yaml into mpp-openshift kustomization#1167
Merged
markturansky merged 1 commit intoalphafrom Apr 2, 2026
Merged
Conversation
…ft kustomization The RBAC Role/RoleBinding granting the control-plane SA get/list/watch/create/delete on tenantnamespaces.tenant.paas.redhat.com in ambient-code--config already existed but was never referenced in kustomization.yaml, causing Forbidden errors when the MPP provisioner tried to manage TenantNamespace CRs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA Kustomize overlay configuration for mpp-openshift was updated to include a new RBAC resource file reference without altering other configuration sections. Changes
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2 tasks
markturansky
added a commit
that referenced
this pull request
Apr 2, 2026
…cement (#1168) ## Summary Follow-up to #1167. The wired-in RBAC had two issues: 1. **Wrong subject namespace**: `subjects[0].namespace` was hardcoded to `ambient-code--runtime-int`, but the CP runs in whatever namespace the overlay deploys to. When deployed to `ambient-code--ambient-s0`, the binding was silently wrong. 2. **Duplicate ClusterRole/ClusterRoleBinding**: The overlay had its own `ClusterRole`/`ClusterRoleBinding` duplicating what `base/rbac/control-plane-clusterrole.yaml` already provides. ## Fix - Remove the duplicated `ClusterRole`/`ClusterRoleBinding` from `ambient-control-plane-rbac.yaml` - Keep only the MPP-specific `Role`/`RoleBinding` for `tenantnamespaces.tenant.paas.redhat.com` - Add a Kustomize `replacement` that sources `subjects[0].namespace` from the `ambient-control-plane` ServiceAccount's `metadata.namespace` — which Kustomize automatically rewrites to match the overlay's `namespace:` field. Any future overlay deploying to a different namespace gets the correct binding automatically, with zero duplication. ## Verification ``` kustomize build components/manifests/overlays/mpp-openshift/ # RoleBinding subjects[0].namespace == ambient-code--runtime-int ✓ ``` ## Test plan - [ ] Apply to MPP cluster and confirm no Forbidden errors on `tenantnamespaces` operations - [ ] CP pod logs show successful project namespace provisioning 🤖 Generated with [Claude Code](https://claude.ai/code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Simplified permissions by removing unused role declarations. * Improved namespace configuration synchronization for role bindings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ambient-control-plane-rbac.yamlalready existed in the mpp-openshift overlay with the correctRole/RoleBindinggranting the CP service accountget/list/watch/create/deleteontenantnamespaces.tenant.paas.redhat.cominambient-code--configkustomization.yaml, so it was never applied — causingForbiddenerrors when theMPPNamespaceProvisionertried to manageTenantNamespaceCRs- ambient-control-plane-rbac.yamlto theresources:listRoot Cause
Error observed after PR #1162 merged:
Test plan
tenantnamespacesoperations🤖 Generated with Claude Code
Summary by CodeRabbit