Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation notice to CLI flags for grpc-storage-plugin sidecar model #4744

Merged
merged 2 commits into from Sep 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions plugin/storage/grpc/options.go
Expand Up @@ -17,6 +17,7 @@ package grpc
import (
"flag"
"fmt"
"log"
"time"

"github.com/spf13/viper"
Expand All @@ -35,6 +36,8 @@ const (
remoteConnectionTimeout = remotePrefix + ".connection-timeout"
defaultPluginLogLevel = "warn"
defaultConnectionTimeout = time.Duration(5 * time.Second)

deprecatedSidecar = "(deprecated, will be removed after 2024-03-01) "
)

// Options contains GRPC plugins configs and provides the ability
Expand All @@ -53,8 +56,8 @@ func tlsFlagsConfig() tlscfg.ClientFlagsConfig {
func (opt *Options) AddFlags(flagSet *flag.FlagSet) {
tlsFlagsConfig().AddFlags(flagSet)

flagSet.String(pluginBinary, "", "The location of the plugin binary")
flagSet.String(pluginConfigurationFile, "", "A path pointing to the plugin's configuration file, made available to the plugin with the --config arg")
flagSet.String(pluginBinary, "", deprecatedSidecar+"The location of the plugin binary")
flagSet.String(pluginConfigurationFile, "", deprecatedSidecar+"A path pointing to the plugin's configuration file, made available to the plugin with the --config arg")
flagSet.String(pluginLogLevel, defaultPluginLogLevel, "Set the log level of the plugin's logger")
flagSet.String(remoteServer, "", "The remote storage gRPC server address as host:port")
flagSet.Duration(remoteConnectionTimeout, defaultConnectionTimeout, "The remote storage gRPC server connection timeout")
Expand All @@ -73,5 +76,8 @@ func (opt *Options) InitFromViper(v *viper.Viper) error {
}
opt.Configuration.RemoteConnectTimeout = v.GetDuration(remoteConnectionTimeout)
opt.Configuration.TenancyOpts = tenancy.InitFromViper(v)
if opt.Configuration.PluginBinary != "" {
log.Printf(deprecatedSidecar + "using sidecar model of grpc-plugin storage, please upgrade to 'reomte' gRPC storage. https://github.com/jaegertracing/jaeger/issues/4647")
}
return nil
}