Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Elastic Agent] Fix picking correct policy id for fleet-server (#25352)
When running the container command, the policy id configured in the fleet-setup.yml file was only picked up, when fleet-server was not enabled. If a fleet-server policy is set, this will be set as the default. Later on this setup call should be improved that not both setups are possible. Currently it could be that the fleet enroll and fleet server setup policy are not identical. To partially test this PR, I did run the elastic agent locally as following: ``` sudo STATE_PATH=${GOPATH}/src/github.com/elastic/beats/x-pack/elastic-agent/state ./elastic-agent container ``` Adjust the path to your needs. In addition, I put the currently checked in fleet-setup.yml file into state directory. In parallel, an elastic-stack setup was running.
- Loading branch information