Skip to content

Commit

Permalink
[elastic-agent] Use fleet.url for container cmd
Browse files Browse the repository at this point in the history
Apply fleet server URL on startup if given.
  • Loading branch information
simitt committed Apr 12, 2021
1 parent 6e6666c commit 3a7083d
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 3a7083d

Please sign in to comment.