diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b13d3b01ca..c38fd62bd11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Changes by Version #### Breaking changes +* Remove deprecated flags `--health-check-http-port` & `--admin-http-port`, please use `--admin.http.host-port` ([#2752](https://github.com/jaegertracing/jaeger/pull/2752), [@pradeepnnv](https://github.com/pradeepnnv)) + #### New Features * Add TLS Support for GRPC and HTTP endpoints of the Query server ([#2337](https://github.com/jaegertracing/jaeger/pull/2337), [@rjs211](https://github.com/rjs211)) diff --git a/cmd/flags/admin.go b/cmd/flags/admin.go index 0ec5dbfe91b..43f54e8295f 100644 --- a/cmd/flags/admin.go +++ b/cmd/flags/admin.go @@ -28,16 +28,12 @@ import ( "github.com/jaegertracing/jaeger/pkg/healthcheck" "github.com/jaegertracing/jaeger/pkg/recoveryhandler" "github.com/jaegertracing/jaeger/pkg/version" - "github.com/jaegertracing/jaeger/ports" ) const ( healthCheckHTTPPort = "health-check-http-port" adminHTTPPort = "admin-http-port" adminHTTPHostPort = "admin.http.host-port" - - healthCheckHTTPPortWarning = "(deprecated, will be removed after 2020-03-15 or in release v1.19.0, whichever is later)" - adminHTTPPortWarning = "(deprecated, will be removed after 2020-06-30 or in release v1.20.0, whichever is later)" ) // AdminServer runs an HTTP server with admin endpoints, such as healthcheck at /, /metrics, etc. @@ -74,26 +70,14 @@ func (s *AdminServer) setLogger(logger *zap.Logger) { // AddFlags registers CLI flags. func (s *AdminServer) AddFlags(flagSet *flag.FlagSet) { - flagSet.Int(healthCheckHTTPPort, 0, healthCheckHTTPPortWarning+" see --"+adminHTTPHostPort) - flagSet.Int(adminHTTPPort, 0, adminHTTPPortWarning+" see --"+adminHTTPHostPort) flagSet.String(adminHTTPHostPort, s.adminHostPort, fmt.Sprintf("The host:port (e.g. 127.0.0.1%s or %s) for the admin server, including health check, /metrics, etc.", s.adminHostPort, s.adminHostPort)) } -// Util function to use deprecated flag value if specified -func (s *AdminServer) checkDeprecatedFlag(v *viper.Viper, actualFlagName string, expectedFlagName string) { - if v := v.GetInt(actualFlagName); v != 0 { - s.logger.Sugar().Warnf("Using deprecated flag %s, please upgrade to %s", actualFlagName, expectedFlagName) - s.adminHostPort = ports.PortToHostPort(v) - } -} - // InitFromViper initializes the server with properties retrieved from Viper. func (s *AdminServer) initFromViper(v *viper.Viper, logger *zap.Logger) { s.setLogger(logger) s.adminHostPort = v.GetString(adminHTTPHostPort) - s.checkDeprecatedFlag(v, healthCheckHTTPPort, adminHTTPHostPort) - s.checkDeprecatedFlag(v, adminHTTPPort, adminHTTPHostPort) } // Handle adds a new handler to the admin server.