From 8720eb85fe62e3dbc27cae0486ed8d22ad132b82 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 11 Dec 2024 22:08:32 -0500 Subject: [PATCH] cleanup Signed-off-by: Yuri Shkuro --- cmd/internal/flags/admin.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cmd/internal/flags/admin.go b/cmd/internal/flags/admin.go index d724edfa9f0..afb5d501074 100644 --- a/cmd/internal/flags/admin.go +++ b/cmd/internal/flags/admin.go @@ -76,19 +76,13 @@ func (s *AdminServer) AddFlags(flagSet *flag.FlagSet) { func (s *AdminServer) initFromViper(v *viper.Viper, logger *zap.Logger) error { s.setLogger(logger) - s.serverCfg.Endpoint = v.GetString(adminHTTPHostPort) tlsAdminHTTP, err := tlsAdminHTTPFlagsConfig.InitFromViper(v) if err != nil { return fmt.Errorf("failed to parse admin server TLS options: %w", err) } - tlsAdminHTTPConfig := tlsAdminHTTP.ToOtelServerConfig() - if tlsAdminHTTPConfig != nil { - s.serverCfg.TLSSetting = tlsAdminHTTPConfig - _, err = s.serverCfg.TLSSetting.LoadTLSConfig(context.Background()) - if err != nil { - return err - } - } + + s.serverCfg.Endpoint = v.GetString(adminHTTPHostPort) + s.serverCfg.TLSSetting = tlsAdminHTTP.ToOtelServerConfig() return nil }