• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 21293416805

23 Jan 2026 04:32PM UTC coverage: 59.937% (+0.05%) from 59.888%
21293416805

push

github

web-flow
Refactor RBAC management to eliminate code duplication (#3368)

* refactor rbac

Signed-off-by: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com>

* Refactor RBAC management to eliminate code duplication

Introduce a common EnsureRBACResources method in pkg/kubernetes/rbac
that consolidates the pattern of creating ServiceAccount, Role, and
RoleBinding resources. This eliminates ~170 lines of duplicated code
across controllers.

Co-authored-by: Yolanda Robla <yolanda@stacklok.com>

* add license headers

* increase test coverage

* changes from review

* fix ci

* changes from review

* bump chart version

---------

Signed-off-by: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com>
Co-authored-by: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com>
Co-authored-by: taskbot <taskbot@users.noreply.github.com>

300 of 310 new or added lines in 7 files covered. (96.77%)

2 existing lines in 1 file now uncovered.

37104 of 61905 relevant lines covered (59.94%)

79.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.64
/cmd/thv-operator/controllers/virtualmcpserver_controller.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc