Skip to content

Remove orphaned registry API Helm templates#4246

Merged
ChrisJBurns merged 1 commit intomainfrom
remove-orphaned-registry-api-helm-templates
Mar 19, 2026
Merged

Remove orphaned registry API Helm templates#4246
ChrisJBurns merged 1 commit intomainfrom
remove-orphaned-registry-api-helm-templates

Conversation

@ChrisJBurns
Copy link
Copy Markdown
Collaborator

Summary

The operator Helm chart included three static templates for registry API RBAC that were never consumed by the operator:

  • registry-api-clusterrole.yaml — ClusterRole toolhive-registry-api-role
  • registry-api-clusterrolebinding.yaml — ClusterRoleBinding toolhive-registry-api-rolebinding
  • registry-api-serviceaccount.yaml — ServiceAccount toolhive-registry-api

These resources are orphaned because the operator dynamically creates namespace-scoped RBAC per MCPRegistry using the {name}-registry-api naming pattern (via GetServiceAccountName() in cmd/thv-operator/pkg/registryapi/types.go), while the static templates bound permissions to a hardcoded toolhive-registry-api ServiceAccount that no pod ever uses. The static ClusterRole also only covered mcpservers read 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

  • Other (cleanup of unused Helm templates)

Test plan

  • helm lint deploy/charts/operator/ passes
  • helm template deploy/charts/operator/ renders without errors
  • task helm-docs regenerates README correctly
  • Grep confirmed zero references to toolhive-registry-api-role, toolhive-registry-api-rolebinding, or toolhive-registry-api SA in Go code, tests, CI, or docs across both toolhive and toolhive-registry-server repos

Special notes for reviewers

The registryAPI.serviceAccount values block was also removed from values.yaml and values-openshift.yaml since it was only consumed by the deleted templates. The registryAPI.image value remains — it is used by the operator deployment template.

Generated with Claude Code

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>
@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Mar 19, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.12%. Comparing base (660babb) to head (eae1176).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJBurns ChrisJBurns merged commit 287e791 into main Mar 19, 2026
39 checks passed
@ChrisJBurns ChrisJBurns deleted the remove-orphaned-registry-api-helm-templates branch March 19, 2026 18:42
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants