From e44bd467f3dc86cfed9353ac97c7eabe39f88d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=2E=20Requena=20Plens?= Date: Sat, 3 Oct 2026 09:44:27 +0200 Subject: [PATCH] fix(search): default the index endpoint to the configured gRPC address --endpoint defaulted to a hardcoded 127.0.0.1:9220, so a search service moved with SEARCH_GRPC_ADDR could only be reached by passing the flag. Use the configured address when the flag is not set. --- services/search/pkg/command/index.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/search/pkg/command/index.go b/services/search/pkg/command/index.go index dfc7eb6cfb..73f7703f53 100644 --- a/services/search/pkg/command/index.go +++ b/services/search/pkg/command/index.go @@ -42,6 +42,10 @@ func Index(cfg *config.Config) *cobra.Command { return fmt.Errorf("concurrency %d exceeds max allowed %d", concurrencyFlag, cfg.ReindexMaxConcurrency) } + if !cmd.Flags().Changed("endpoint") { + endpointFlag = cfg.GRPC.Addr + } + tlsMode := pool.TLSOff if !insecureFlag { mode, err := pool.StringToTLSMode(cfg.GRPCClientTLS.Mode) @@ -122,8 +126,8 @@ func Index(cfg *config.Config) *cobra.Command { ) indexCmd.Flags().String( "endpoint", - "127.0.0.1:9220", - "the address of the search service gRPC endpoint.", + "", + "the address of the search service gRPC endpoint. Defaults to the service's configured gRPC address (SEARCH_GRPC_ADDR).", ) indexCmd.Flags().Bool( "insecure",