Revert backwards incompatible reva config changes

The commit of unifying the Reva Client config introduced some backwards
incompatible changes to the config structures and yaml config tags. For
the "thumbnails", "webdav" and "notifications" service. This reverts the
changes on the service and introduces TLS options in a backwards
compatible manner.
This commit is contained in:
Ralf Haferkamp
2022-10-20 11:56:17 +02:00
committed by Ralf Haferkamp
parent 8cead4557f
commit fbb3382a42
10 changed files with 71 additions and 31 deletions

View File

@@ -77,12 +77,17 @@ func Server(cfg *config.Config) *cli.Command {
if err != nil {
return err
}
tm, err := pool.StringToTLSMode(cfg.Notifications.RevaGatewayTLSMode)
if err != nil {
return err
}
gwclient, err := pool.GetGatewayServiceClient(
cfg.Notifications.Reva.Address,
cfg.Notifications.Reva.GetRevaOptions()...,
cfg.Notifications.RevaGateway,
pool.WithTLSCACert(cfg.Notifications.RevaGatewayTLSCACert),
pool.WithTLSMode(tm),
)
if err != nil {
logger.Fatal().Err(err).Str("addr", cfg.Notifications.Reva.Address).Msg("could not get reva client")
logger.Fatal().Err(err).Str("addr", cfg.Notifications.RevaGateway).Msg("could not get reva client")
}
svc := service.NewEventsNotifier(evts, channel, logger, gwclient, cfg.Notifications.MachineAuthAPIKey, cfg.Notifications.EmailTemplatePath, cfg.Commons.OcisURL)