-
Notifications
You must be signed in to change notification settings - Fork 486
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
Flow Windows service: Support environment variables #5762
Conversation
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
* `Arguments` (Type `REG_MULTI_SZ`) Each value represents a binary argument for grafana-agent-flow binary. | ||
* `Environment` (Type `REG_MULTI_SZ`) Each value represents a environment value `KEY=VALUE` for grafana-agent-flow binary. |
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 think people might find it useful if we include a regedit printout of an example configuration. I don't insist on it, will leave it up to you to decide.
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.
Do you mean the output of reg query
?
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 guess so? I've only used reg export
and I suppose reg query
does a similar job. As long as people can see the values in a format they can recognise, it's ok.
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.
Thank you!
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Robert Fratto <[email protected]>
Co-authored-by: Clayton Cornell <[email protected]>
Is there anything from my side todo 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.
Looking good from my end
I fixed the Changelog entry, since 0.38 is released. |
* Implement windows service environment variabls Signed-off-by: Jan-Otto Kröpke <[email protected]> * Changelog Signed-off-by: Jan-Otto Kröpke <[email protected]> * Add NSIS argument * Always override Environment, since its an expected user input Signed-off-by: Jan-Otto Kröpke <[email protected]> * Update cmd/grafana-agent-service/config_windows.go Co-authored-by: Robert Fratto <[email protected]> * Update cmd/grafana-agent-service/config_windows.go * Update docs/sources/flow/setup/install/windows.md Co-authored-by: Clayton Cornell <[email protected]> * Update CHANGELOG.md --------- Signed-off-by: Jan-Otto Kröpke <[email protected]> Co-authored-by: mattdurham <[email protected]> Co-authored-by: Robert Fratto <[email protected]> Co-authored-by: Clayton Cornell <[email protected]>
PR Description
Windows support environments for global, per user and per service. All three os native methods have downsides
I copied the replicate the Arguments logic for Environment. Environment are needed to inject configuration from outside. Define configuration via CLI argument is not supported (see: grafana/alloy#308)
Which issue(s) this PR fixes
Notes to the Reviewer
Tested on Windows Server 2022.
PR Checklist