Skip to content

Commit

Permalink
[elastic-agent] Use fleet.url for container cmd (elastic#25026)
Browse files Browse the repository at this point in the history
Apply fleet server URL on startup if given.
  • Loading branch information
simitt authored Apr 13, 2021
1 parent d11874e commit e8afb8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x-pack/elastic-agent/pkg/agent/cmd/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ func buildEnrollArgs(cfg setupConfig, token string, policyID string) ([]string,
if cfg.FleetServer.CertKey != "" {
args = append(args, "--fleet-server-cert-key", cfg.FleetServer.CertKey)
}
if cfg.Fleet.URL != "" {
args = append(args, "--url", cfg.Fleet.URL)
}
if cfg.FleetServer.InsecureHTTP {
args = append(args, "--fleet-server-insecure-http")
args = append(args, "--insecure")
Expand Down

0 comments on commit e8afb8d

Please sign in to comment.