Skip to content

Commit 165ac36

Browse files
Remove deprecated admin server flags (#2752)
* Remove healthCheckHTTPPortWarning Fixes #2738 Signed-off-by: pradeepnnv <pradeepnnv@gmail.com> * Remove deprecated flag adminHTTPPortWarning Add breaking change entry to CHANGELOG Fixes part of #2738 Signed-off-by: pradeepnnv <pradeepnnv@gmail.com> * Update CHANGELOG.md Update Change log to use actual CLI Flags instead of variable names. Fixes part of #2738 Signed-off-by: pradeepnnv <pradeepnnv@gmail.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Signed-off-by: pradeepnnv <pradeepnnv@gmail.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
1 parent 5c4fe1f commit 165ac36

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Changes by Version
88

99
#### Breaking changes
1010

11+
* 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))
12+
1113
#### New Features
1214

1315
* 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))

cmd/flags/admin.go

-16
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ import (
2828
"github.com/jaegertracing/jaeger/pkg/healthcheck"
2929
"github.com/jaegertracing/jaeger/pkg/recoveryhandler"
3030
"github.com/jaegertracing/jaeger/pkg/version"
31-
"github.com/jaegertracing/jaeger/ports"
3231
)
3332

3433
const (
3534
healthCheckHTTPPort = "health-check-http-port"
3635
adminHTTPPort = "admin-http-port"
3736
adminHTTPHostPort = "admin.http.host-port"
38-
39-
healthCheckHTTPPortWarning = "(deprecated, will be removed after 2020-03-15 or in release v1.19.0, whichever is later)"
40-
adminHTTPPortWarning = "(deprecated, will be removed after 2020-06-30 or in release v1.20.0, whichever is later)"
4137
)
4238

4339
// 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) {
7470

7571
// AddFlags registers CLI flags.
7672
func (s *AdminServer) AddFlags(flagSet *flag.FlagSet) {
77-
flagSet.Int(healthCheckHTTPPort, 0, healthCheckHTTPPortWarning+" see --"+adminHTTPHostPort)
78-
flagSet.Int(adminHTTPPort, 0, adminHTTPPortWarning+" see --"+adminHTTPHostPort)
7973
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))
8074
}
8175

82-
// Util function to use deprecated flag value if specified
83-
func (s *AdminServer) checkDeprecatedFlag(v *viper.Viper, actualFlagName string, expectedFlagName string) {
84-
if v := v.GetInt(actualFlagName); v != 0 {
85-
s.logger.Sugar().Warnf("Using deprecated flag %s, please upgrade to %s", actualFlagName, expectedFlagName)
86-
s.adminHostPort = ports.PortToHostPort(v)
87-
}
88-
}
89-
9076
// InitFromViper initializes the server with properties retrieved from Viper.
9177
func (s *AdminServer) initFromViper(v *viper.Viper, logger *zap.Logger) {
9278
s.setLogger(logger)
9379

9480
s.adminHostPort = v.GetString(adminHTTPHostPort)
95-
s.checkDeprecatedFlag(v, healthCheckHTTPPort, adminHTTPHostPort)
96-
s.checkDeprecatedFlag(v, adminHTTPPort, adminHTTPHostPort)
9781
}
9882

9983
// Handle adds a new handler to the admin server.

0 commit comments

Comments
 (0)