-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Agent] Allow CLI paths override #17781
[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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes for Data and home looks good to me but I don't think we have support for -E?
) | ||
|
||
func init() { | ||
homePath = retrieveExecutablePath() | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename Data path, agent usually look for beats here
to Data path contains Agent managed binary")
@@ -50,11 +50,12 @@ func NewCommandWithArgs(args []string, streams *cli.IOStreams) *cobra.Command { | |||
|
|||
flags := &globalFlags{} | |||
|
|||
cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("E")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Allowing override of configuration using
-E
flag of two specific cases--path.data
--path.home
Why is it important?
Allows having data (download, install) outside of agent directory without manually changing configuration file
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.