Add finalizers permission for APIKeyRequest owner references#65
Conversation
Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 47 minutes and 41 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request adds RBAC permissions enabling the API key approval controller to update finalizers on API key request resources. A kubebuilder RBAC annotation is added to the controller, and the corresponding cluster role rule is generated in the RBAC configuration manifest. ChangesFinalizer Update Permissions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
Summary
apikeyrequestsresourceWhy
When
APIKeyApprovalReconcilersets an owner reference from APIKeyRequest to APIKeyApproval usingcontrollerutil.SetControllerReference(), it setsblockOwnerDeletion: trueby default. Openshift requires the controller to have permission to update finalizers on the owner resource to prevent orphaned resources.Without this permission, the controller fails with the error mentioned above.
Test plan
Summary by CodeRabbit