Skip to content

Commit a8cb588

Browse files
authored
[Elastic Agent] Fix issue with FLEET_CA not being used with Fleet Server in container (#26529)
* Fix issue with FLEET_CA not being used with fleet server is enabled in container. * Add changelog.
1 parent cc46a7c commit a8cb588

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

x-pack/elastic-agent/CHANGELOG.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
- Fix windows installer during enroll {pull}24343[24343]
4545
- Logging to file disabled on enroll {issue}24173[24173]
4646
- Prevent uninstall failures on empty config {pull}24838[24838]
47+
- Fix issue with FLEET_CA not being used with Fleet Server in container {pull}26529[26529]
4748

4849
==== New features
4950

x-pack/elastic-agent/pkg/agent/cmd/container.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ func buildEnrollArgs(cfg setupConfig, token string, policyID string) ([]string,
385385
if cfg.Fleet.Insecure {
386386
args = append(args, "--insecure")
387387
}
388-
if cfg.Fleet.CA != "" {
389-
args = append(args, "--certificate-authorities", cfg.Fleet.CA)
390-
}
388+
}
389+
if cfg.Fleet.CA != "" {
390+
args = append(args, "--certificate-authorities", cfg.Fleet.CA)
391391
}
392392
if token != "" {
393393
args = append(args, "--enrollment-token", token)

0 commit comments

Comments
 (0)