stacklok / stacklok/toolhive

Remove unused webhook server listening on port 9443

Open Beginner friendly
#4,627 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug go kubernetes operator
Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

Summary

The operator manager starts a TLS webhook server on port 9443 with zero registered handlers. No webhook handlers are registered anywhere in the codebase, making this a wasted resource.

Severity: MUST FIX
Area: Webhooks
Breaking: No

Location

  • cmd/thv-operator/main.go:81

Problem

WebhookServer: webhook.NewServer(webhook.Options{Port: 9443}),

The manager starts a TLS listener on port 9443 with zero registered handlers. No webhook handlers are registered anywhere in the codebase.

Impact

  • Wasted port and goroutines
  • Potential confusion if port conflicts arise
  • The Helm chart doesn't expose port 9443, so the listener is unreachable

Recommended Fix

Remove the WebhookServer line from manager options until webhooks are actually implemented. Optionally, make it conditional on a feature flag.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at cmd/thv-operator/main.go:81 and inspect the manager options around the WebhookServer entry. Confirm that no webhook handlers are registered and that the Helm chart does not expose port 9443. Done means the unused webhook server is no longer started while the operator manager still initializes normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.