Add Fournos labels to Tekton managed workspace PVCs; fix RBAC for default Tekton pipeline SA#75
Conversation
…ault Tekton pipeline SA Signed-off-by: avasilev <avasilev@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
📝 WalkthroughWalkthroughThis PR modifies Tekton pipeline creation to propagate existing labels to dynamically created PVC metadata, and updates Kubernetes RBAC configuration to grant role binding permissions to an additional service account in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
fournos/core/tekton.py (1)
95-97: ⚡ Quick winAdd a regression test for PVC label propagation.
This behavior is important for selectors/cleanup flows; a small unit test asserting
workspaces[0].volumeClaimTemplate.metadata.labelsin the generated body would prevent regressions.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@fournos/core/tekton.py` around lines 95 - 97, Add a unit test that asserts PVC label propagation by constructing the same input used to build the Tekton body and verifying that workspaces[0].volumeClaimTemplate.metadata.labels equals the expected labels; locate the code path that produces the body (the function that returns or builds `workspaces`, typically where `workspaces` and `volumeClaimTemplate` are assembled) and call it in the test, then assert the labels are present and equal to the input `labels` map to prevent regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@fournos/core/tekton.py`:
- Around line 95-97: Add a unit test that asserts PVC label propagation by
constructing the same input used to build the Tekton body and verifying that
workspaces[0].volumeClaimTemplate.metadata.labels equals the expected labels;
locate the code path that produces the body (the function that returns or builds
`workspaces`, typically where `workspaces` and `volumeClaimTemplate` are
assembled) and call it in the test, then assert the labels are present and equal
to the input `labels` map to prevent regressions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e2e65c88-a0f1-462a-916a-22506419269b
📒 Files selected for processing (2)
fournos/core/tekton.pymanifests/ocpci-sa/rbac-wip-ns.yaml
|
thanks, LGTM |
|
/lgtm |
|
/test deploy-fournos-wip |
|
🟢 Test of 'fournos_deploy --project-source' succeeded after 00 hours 10 minutes 20 seconds 🟢 • Link to the test results. • No reports index generated... Test configuration: |
Summary by CodeRabbit
Release Notes
Bug Fixes
Chores