unified-storage: Missing rename of index_server to search_server (#107469)

* rename
pull/107479/head
Will Assis 3 weeks ago committed by GitHub
parent fdf4935e42
commit fe7ca61a51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      pkg/services/apiserver/options/storage.go
  2. 16
      pkg/storage/unified/client.go
  3. 6
      pkg/storage/unified/client_test.go

@ -43,7 +43,7 @@ type StorageOptions struct {
// For unified-grpc
Address string
IndexServerAddress string
SearchServerAddress string
GrpcClientAuthenticationToken string
GrpcClientAuthenticationTokenExchangeURL string
GrpcClientAuthenticationTokenNamespace string
@ -138,8 +138,8 @@ func (o *StorageOptions) ApplyTo(serverConfig *genericapiserver.RecommendedConfi
return err
}
var indexConn *grpc.ClientConn
if o.IndexServerAddress != "" {
indexConn, err = grpc.NewClient(o.IndexServerAddress,
if o.SearchServerAddress != "" {
indexConn, err = grpc.NewClient(o.SearchServerAddress,
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)

@ -58,12 +58,12 @@ func ProvideUnifiedStorageClient(opts *Options,
// See: apiserver.applyAPIServerConfig(cfg, features, o)
apiserverCfg := opts.Cfg.SectionWithEnvOverrides("grafana-apiserver")
client, err := newClient(options.StorageOptions{
StorageType: options.StorageType(apiserverCfg.Key("storage_type").MustString(string(options.StorageTypeUnified))),
DataPath: apiserverCfg.Key("storage_path").MustString(filepath.Join(opts.Cfg.DataPath, "grafana-apiserver")),
Address: apiserverCfg.Key("address").MustString(""),
IndexServerAddress: apiserverCfg.Key("index_server_address").MustString(""),
BlobStoreURL: apiserverCfg.Key("blob_url").MustString(""),
BlobThresholdBytes: apiserverCfg.Key("blob_threshold_bytes").MustInt(options.BlobThresholdDefault),
StorageType: options.StorageType(apiserverCfg.Key("storage_type").MustString(string(options.StorageTypeUnified))),
DataPath: apiserverCfg.Key("storage_path").MustString(filepath.Join(opts.Cfg.DataPath, "grafana-apiserver")),
Address: apiserverCfg.Key("address").MustString(""),
SearchServerAddress: apiserverCfg.Key("search_server_address").MustString(""),
BlobStoreURL: apiserverCfg.Key("blob_url").MustString(""),
BlobThresholdBytes: apiserverCfg.Key("blob_threshold_bytes").MustInt(options.BlobThresholdDefault),
}, opts.Cfg, opts.Features, opts.DB, opts.Tracer, opts.Reg, opts.Authzc, opts.Docs, storageMetrics, indexMetrics)
if err == nil {
// Used to get the folder stats
@ -135,8 +135,8 @@ func newClient(opts options.StorageOptions,
return nil, err
}
if opts.IndexServerAddress != "" {
indexConn, err = newGrpcConn(opts.IndexServerAddress, metrics, features)
if opts.SearchServerAddress != "" {
indexConn, err = newGrpcConn(opts.SearchServerAddress, metrics, features)
if err != nil {
return nil, err

@ -65,9 +65,9 @@ func TestUnifiedStorageClient(t *testing.T) {
client, err := newClient(
options.StorageOptions{
StorageType: options.StorageTypeUnifiedGrpc,
Address: resourceServerAddress,
IndexServerAddress: indexServerAddress,
StorageType: options.StorageTypeUnifiedGrpc,
Address: resourceServerAddress,
SearchServerAddress: indexServerAddress,
},
&setting.Cfg{},
featuremgmt.WithFeatures(),

Loading…
Cancel
Save