sig: remove default prometheus address
The SIG was setting a default prometheus address, contrary to what is
documented; the docs explicitly say that if the address is unset, the
metrics will not be exported. This default value would also make it
impossible to disable exporting metrics.
Remove the undocumented, unneeded default value.
@@ -72,7 +72,7 @@ func realMain() int {
defer log.Flush()
defer env.LogAppStopped("SIG", cfg.Sig.ID)
defer log.HandlePanic()
- if err := validateConfig(); err != nil {
+ if err := cfg.Validate(); err != nil {
log.Error("Configuration validation failed", "err", err)
return 1
}
@@ -140,16 +140,6 @@ func setupBasic() error {
return env.LogAppStarted("SIG", cfg.Sig.ID)
}
-func validateConfig() error {
- if err := cfg.Validate(); err != nil {
- return err
- }
- if cfg.Metrics.Prometheus == "" {
- cfg.Metrics.Prometheus = "127.0.0.1:30456"
- }
- return nil
-}
-
func setupTun() (io.ReadWriteCloser, error) {
if err := checkPerms(); err != nil {
return nil, serrors.WrapStr("Permissions checks failed", err)
