-
Notifications
You must be signed in to change notification settings - Fork 48
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 manager options #165
log manager options #165
Conversation
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
"LeaderElectionId", options.LeaderElectionID, | ||
"LeaderElectionNamespace", options.LeaderElectionNamespace) |
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.
Will it be confusing for the logs to include output for unset or unused flags?
For example, this is going to output something like: LeaderElectionId="", LeaderElectionNamespace=""
even if leader election is disabled. Is that what we want?
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.
That's a good point. I think if leader election is disabled it is likely not important to log those values. I will work on making it so those values are only logged if they are set.
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.
As of commit 37c3d87 it should only show the options that have been specified via the flags or have a default value.
The output will now look like this with both leader election related flags:
{"level":"info","ts":1652113560.2827275,"logger":"cmd","msg":"Setting manager options:","Options":{"HealthProbeAddress":":8081","LeaderElection":true,"LeaderElectionId":"1","LeaderElectionNamespace":"test","MetricsBindAddress":":8080"}}
With only one:
{"level":"info","ts":1652113924.1076055,"logger":"cmd","msg":"Setting manager options:","Options":{"HealthProbeAddress":":8081","LeaderElection":true,"LeaderElectionId":"1","MetricsBindAddress":":8080"}}
With neither:
{"level":"info","ts":1652113954.4604402,"logger":"cmd","msg":"Setting manager options:","Options":{"HealthProbeAddress":":8081","LeaderElection":false,"MetricsBindAddress":":8080"}}
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
Pull Request Test Coverage Report for Build 2295498115
💛 - Coveralls |
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
Description of the change
Add logging of the manager options for both the helm and hybrid operator commands
Motivation for the change
resolves #24