Skip to content

feat: add grpc-disabled config option for server#961

Open
kalleep wants to merge 2 commits into
mainfrom
kalleep/optional-grpc-server
Open

feat: add grpc-disabled config option for server#961
kalleep wants to merge 2 commits into
mainfrom
kalleep/optional-grpc-server

Conversation

@kalleep

@kalleep kalleep commented Apr 16, 2026

Copy link
Copy Markdown

What this PR does:
Add config option to disable the grpc listener when creating a Server. I named it GRPCDisabled to keep it consistent with other grpc related options.

With this option the grpc listener is never created. The GRPC server is still created but will never be started, we could change this too if that is a preference.

Which issue(s) this PR fixes:

Fixes #954

Checklist

  • Tests updated

Note

Medium Risk
Changes core server startup/run behavior and introduces conditional gRPC initialization, which could impact deployments relying on gRPC being available or on side effects of HTTP-over-gRPC registration.

Overview
Adds a new Config.GRPCDisabled (YAML grpc_disabled + -server.grpc-disabled flag) to optionally skip creating the gRPC listener.

When enabled, server startup now avoids gRPC listener setup (including PROXY protocol wrapping), adjusts startup logging, and skips registering/serving the HTTP-over-gRPC handler; GRPCListenAddr() returns nil in this mode. Adds TestGRPCDisabled to verify HTTP still serves while gRPC is not listening.

Reviewed by Cursor Bugbot for commit 393913c. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support listenting only on http (and not grpc)

1 participant