Skip to content

Commit

Permalink
Merge pull request #94 from israel-hdez/security-updates-v011
Browse files Browse the repository at this point in the history
[v0.11] Changes to minimize exposure to security issues
  • Loading branch information
israel-hdez authored Oct 6, 2023
2 parents 523be1a + 820006e commit 1c21579
Show file tree
Hide file tree
Showing 3 changed files with 587 additions and 604 deletions.
6 changes: 3 additions & 3 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

var (
port = flag.String("port", "9081", "Agent port")
componentPort = flag.String("component-port", "8080", "Component port")
componentPort = flag.Int("component-port", 8080, "Component port")
// model puller flags
enablePuller = flag.Bool("enable-puller", false, "Enable model puller")
configDir = flag.String("config-dir", "/mnt/configs", "directory for model config files")
Expand Down Expand Up @@ -282,13 +282,13 @@ func buildProbe(logger *zap.SugaredLogger, probeJSON string) *readiness.Probe {
return newProbe
}

func buildServer(ctx context.Context, port string, userPort string, loggerArgs *loggerArgs, batcherArgs *batcherArgs,
func buildServer(ctx context.Context, port string, userPort int, loggerArgs *loggerArgs, batcherArgs *batcherArgs,
probeContainer func() bool, logging *zap.SugaredLogger) (server *http.Server, drain func()) {

logging.Infof("Building server user port %s port %s", userPort, port)
target := &url.URL{
Scheme: "http",
Host: net.JoinHostPort("127.0.0.1", userPort),
Host: net.JoinHostPort("127.0.0.1", strconv.Itoa(userPort)),
}

maxIdleConns := 1000 // TODO: somewhat arbitrary value for CC=0, needs experimental validation.
Expand Down
Loading

0 comments on commit 1c21579

Please sign in to comment.