[Agent] Allow CLI paths override#17781
Conversation
|
Pinging @elastic/ingest-management (Project:fleet) |
|
not ready for review, libbeat is bugging me with global use of flags |
ph
left a comment
There was a problem hiding this comment.
Changes for Data and home looks good to me but I don't think we have support for -E?
| dataPath = retrieveDataPath() | ||
| overwrites = common.SettingFlag(nil, "E", "Configuration overwrite") | ||
| common.ConfigOverwriteFlag(nil, overwrites, "path.home", "path.home", "", "Agent root path") | ||
| common.ConfigOverwriteFlag(nil, overwrites, "path.data", "path.data", "", "Data path, agent usually look for beats here") |
There was a problem hiding this comment.
rename Data path, agent usually look for beats here to Data path contains Agent managed binary")
|
|
||
| flags := &globalFlags{} | ||
|
|
||
| cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("E")) |
There was a problem hiding this comment.
I don't see code to make this work?
|
@michalpristas for -E lets make it a followup issue, Is there anything that could prevent us to support it ? |
|
@michalpristas I have testes this locally with |
ph
left a comment
There was a problem hiding this comment.
LGTM, can you create an issue to make sure the fleet.yml and the action_store respect theses path?
|
Linked #17967 |
…unbld * upstream/master: ci: comment PRs with the build status (elastic#17971) Add domain state metricset to kvm module (elastic#17673) [Agent] Allow CLI paths override (elastic#17781) Fix generated metricbeat so create-metricset works. (elastic#18020) LIBBEAT: Enhancement replace_string processor for replacing strings values of fields. (elastic#17342) Update stale references to _xpack to refer to _license instead (elastic#18030) Review dependency patterns collection in Jenkins (elastic#18004)
[Agent] Allow CLI paths override (elastic#17781)
What does this PR do?
Allowing override of configuration using
-Eflag of two specific cases--path.data--path.homeWhy is it important?
Allows having data (download, install) outside of agent directory without manually changing configuration file
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.