1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(docker-proxy): reduce DB writes to optimize the proxy calls EE-5516 (#9148)

This commit is contained in:
andres-portainer 2023-07-05 09:25:05 -03:00 committed by GitHub
parent b37120802e
commit 74515f102d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 61 additions and 73 deletions

View file

@ -52,6 +52,7 @@ import (
"github.com/portainer/portainer/api/http/handler/users"
"github.com/portainer/portainer/api/http/handler/webhooks"
"github.com/portainer/portainer/api/http/handler/websocket"
"github.com/portainer/portainer/api/http/middlewares"
"github.com/portainer/portainer/api/http/offlinegate"
"github.com/portainer/portainer/api/http/proxy"
"github.com/portainer/portainer/api/http/proxy/factory/kubernetes"
@ -330,6 +331,9 @@ func (server *Server) Start() error {
errorLogger := NewHTTPLogger()
handler := adminMonitor.WithRedirect(offlineGate.WaitingMiddleware(time.Minute, server.Handler))
handler = middlewares.WithSlowRequestsLogger(handler)
if server.HTTPEnabled {
go func() {
log.Info().Str("bind_address", server.BindAddress).Msg("starting HTTP server")