Skip to content

Commit 3b63918

Browse files
committed
fix(config): rename metrics HTTP2 flag for clarity and consistency
1 parent 5adfd0b commit 3b63918

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

config/config.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ type CommonServiceConfig struct {
4444
Metrics struct {
4545
BindAddress string `mapstructure:"metrics-bind-address"`
4646
Secure bool `mapstructure:"metrics-secure"`
47-
EnableHTTP2 bool `mapstructure:"metrics-enable-http2"`
4847
} `mapstructure:",squash"`
49-
48+
EnableHTTP2 bool `mapstructure:"enable-http2"`
5049
HealthProbeBindAddress string `mapstructure:"health-probe-bind-address"`
5150

5251
LeaderElection struct {
@@ -73,7 +72,7 @@ func CommonFlags() *pflag.FlagSet {
7372
flagSet.Duration("shutdown-timeout", 1*time.Minute, "Set the shutdown timeout")
7473
flagSet.String("metrics-bind-address", ":8080", "Set the metrics bind address")
7574
flagSet.Bool("metrics-secure", false, "Set if metrics should be exposed via https")
76-
flagSet.Bool("metrics-enable-http2", true, "Toggle to disable metrics serving using http2")
75+
flagSet.Bool("enable-http2", true, "Toggle to disable metrics/webhook serving using http2")
7776
flagSet.String("health-probe-bind-address", ":8090", "Set the health probe bind address")
7877
flagSet.Bool("leader-elect", false, "Enable leader election")
7978
flagSet.String("sentry-dsn", "", "Set the Sentry DSN")

0 commit comments

Comments
 (0)