Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/rekor-server/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func init() {
rootCmd.PersistentFlags().Uint16("trillian_log_server.port", 8090, "Trillian log server port")
rootCmd.PersistentFlags().Uint("trillian_log_server.tlog_id", 0, "Trillian tree id")
rootCmd.PersistentFlags().String("trillian_log_server.sharding_config", "", "path to config file for inactive shards, in JSON or YAML")
rootCmd.PersistentFlags().String("trillian_log_server.grpc_default_service_config", "", "JSON string used to configure gRPC clients for communicating with Trillian")

rootCmd.PersistentFlags().Uint("publish_frequency", 5, "how often to publish a new checkpoint, in minutes")

Expand Down
1 change: 1 addition & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
"serve",
"--trillian_log_server.address=trillian-log-server",
"--trillian_log_server.port=8090",
"--trillian_log_server.grpc_default_service_config={\"loadBalancingPolicy\":\"round_robin\"}",
"--redis_server.address=redis-server",
"--redis_server.port=6379",
"--redis_server.password=test",
Expand Down
8 changes: 7 additions & 1 deletion pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ func dial(rpcServer string) (*grpc.ClientConn, error) {
default:
creds = insecure.NewCredentials()
}
conn, err := grpc.NewClient(rpcServer, grpc.WithTransportCredentials(creds))

opts := []grpc.DialOption{grpc.WithTransportCredentials(creds)}
grpcDefaultServiceConfig := viper.GetString("trillian_log_server.grpc_default_service_config")
if grpcDefaultServiceConfig != "" {
opts = append(opts, grpc.WithDefaultServiceConfig(grpcDefaultServiceConfig))
}
conn, err := grpc.NewClient(rpcServer, opts...)
if err != nil {
log.Logger.Fatalf("Failed to connect to RPC server:", err)
}
Expand Down