-
Notifications
You must be signed in to change notification settings - Fork 83
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
Log redacted config on config changes #1671
Log redacted config on config changes #1671
Conversation
This pull request is now in conflicts. Could you fix it @michel-laterman? 🙏
|
36eac13
to
71a6f35
Compare
This pull request is now in conflicts. Could you fix it @michel-laterman? 🙏
|
@michel-laterman Friendly bump on this one. @pierrehilbert should we be tracking this for 8.5? |
redacted := &config.Config{ | ||
Fleet: cfg.Fleet, | ||
Output: cfg.Output, | ||
Inputs: make([]config.Input, 1), |
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.
having this as cfg.Inputs
causes one of the integration tests to fail.
cmd/fleet/main.go
Outdated
@@ -538,7 +538,7 @@ LOOP: | |||
|
|||
select { | |||
case newCfg = <-f.cfgCh: | |||
log.Info().Msg("Server configuration update") | |||
log.Info().Interface("cfg", redactConfig(curCfg)).Msg("Server configuration update") |
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.
alternatively we can use the redactConfig
call instead of redactServerCfg
on lines 643 & 659 in configChangedServer
(where it logs old/new config)
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 for more debug options.
What is the problem this PR solves?
Debugging the fleet-server can be difficult as it is not clear what config it is running.
How does this PR solve the problem?
Output redacted configuration when an updated config is received.
How to test this PR locally
downloads
dir.fleet-server
integrationChecklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues