Remove orphaned registry API Helm templates#4246
Merged
ChrisJBurns merged 1 commit intomainfrom Mar 19, 2026
Merged
Conversation
The static registry-api ClusterRole, ClusterRoleBinding, and
ServiceAccount templates were never used by the operator. The operator
dynamically creates namespace-scoped RBAC per MCPRegistry using
{name}-registry-api naming, while these templates created resources
bound to a hardcoded toolhive-registry-api ServiceAccount that no pod
ever references.
Also removes the now-unused registryAPI.serviceAccount values from
both values.yaml and values-openshift.yaml.
Refs #4245
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rdimitrov
approved these changes
Mar 19, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4246 +/- ##
==========================================
- Coverage 69.12% 69.12% -0.01%
==========================================
Files 470 470
Lines 47388 47388
==========================================
- Hits 32757 32756 -1
Misses 12093 12093
- Partials 2538 2539 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sanskarzz
pushed a commit
to Sanskarzz/toolhive
that referenced
this pull request
Mar 23, 2026
The static registry-api ClusterRole, ClusterRoleBinding, and
ServiceAccount templates were never used by the operator. The operator
dynamically creates namespace-scoped RBAC per MCPRegistry using
{name}-registry-api naming, while these templates created resources
bound to a hardcoded toolhive-registry-api ServiceAccount that no pod
ever references.
Also removes the now-unused registryAPI.serviceAccount values from
both values.yaml and values-openshift.yaml.
Refs stacklok#4245
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
The operator Helm chart included three static templates for registry API RBAC that were never consumed by the operator:
registry-api-clusterrole.yaml— ClusterRoletoolhive-registry-api-roleregistry-api-clusterrolebinding.yaml— ClusterRoleBindingtoolhive-registry-api-rolebindingregistry-api-serviceaccount.yaml— ServiceAccounttoolhive-registry-apiThese resources are orphaned because the operator dynamically creates namespace-scoped RBAC per MCPRegistry using the
{name}-registry-apinaming pattern (viaGetServiceAccountName()incmd/thv-operator/pkg/registryapi/types.go), while the static templates bound permissions to a hardcodedtoolhive-registry-apiServiceAccount that no pod ever uses. The static ClusterRole also only coveredmcpserversread access, whereas the dynamic Role covers the full set of resources the registry API needs (mcpservers, mcpremoteproxies, virtualmcpservers, services, gateway API resources, leader election).Verified that neither this repo nor toolhive-registry-server reference the removed resource names anywhere in Go code, tests, CI, or documentation.
Refs #4245
Type of change
Test plan
helm lint deploy/charts/operator/passeshelm template deploy/charts/operator/renders without errorstask helm-docsregenerates README correctlytoolhive-registry-api-role,toolhive-registry-api-rolebinding, ortoolhive-registry-apiSA in Go code, tests, CI, or docs across both toolhive and toolhive-registry-server reposSpecial notes for reviewers
The
registryAPI.serviceAccountvalues block was also removed fromvalues.yamlandvalues-openshift.yamlsince it was only consumed by the deleted templates. TheregistryAPI.imagevalue remains — it is used by the operator deployment template.Generated with Claude Code