Skip to content

chore: Remove deprecated MCPServer (Toolhive) webhook from Helm chart and codebase #150

Closed

Description

@cwiklik

Summary

The MCPServer CR (Toolhive / toolhive.stacklok.dev/v1alpha1) is no longer supported. The corresponding webhook handlers and Helm chart templates should be removed.

Files to Remove

Helm chart templates (charts/kagenti-webhook/templates/):

  • mcpserver-mutatingwebhook.yaml — registers /mutate-toolhive-stacklok-dev-v1alpha1-mcpserver
  • mcpserver-validatingwebhook.yaml — registers /validate-toolhive-stacklok-dev-v1alpha1-mcpserver

Go implementation (kagenti-webhook/internal/webhook/v1alpha1/):

  • mcpserver_webhook.go — webhook handler (MCPServerWebhook, SetupMCPServerWebhookWithManager)
  • mcpserver_webhook_test.go — tests for the above

Registration (kagenti-webhook/cmd/ or main.go):

  • Remove the call to SetupMCPServerWebhookWithManager from the manager setup

Generated manifests (kagenti-webhook/config/webhook/):

  • Remove the MCPServer entries from manifests.yaml

Acceptance Criteria

  • Helm chart no longer renders MutatingWebhookConfiguration or ValidatingWebhookConfiguration for mcpservers
  • Go webhook handler and tests are deleted
  • Manager no longer registers the MCPServer webhook path
  • go build ./... and go test ./... pass
  • helm lint charts/kagenti-webhook passes
  • No references to toolhive.stacklok.dev remain in the webhook codebase

Related

  • The ShouldMutate / MutatePodSpec deprecated path used by this webhook can be cleaned up once both the MCPServer and Agent webhooks are removed (tracked separately).

Activity

  1. self-assigned this
    on Feb 26, 2026
  2. added theissue type on Feb 26, 2026
  3. added a commit that references this issue on Feb 27, 2026
    824b143
  4. added 2 commits that reference this issue on Aug 26, 2026
    17852fc
    af9aa02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions