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
kubelet: activate logging sooner #104997
kubelet: activate logging sooner #104997
Conversation
Without this, some error messages during startup are printed in text format although JSON was requested. Before: $ go run ./cmd/kubelet --logging-format=json ... E0914 10:54:57.540301 69656 server.go:271] "Failed to construct kubelet dependencies" err="error reading /var/lib/kubelet/pki/kubelet.key, certificate and key must be supplied as a pair" exit status 1 After: $ go run ./cmd/kubelet --logging-format=json ... {"ts":1631610094233.7605,"caller":"app/server.go:276","msg":"Failed to construct kubelet dependencies","err":"error reading /var/lib/kubelet/pki/kubelet.key, certificate and key must be supplied as a pair"}
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pohly The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/priority backlog |
// Activate final logging options as soon as we have | ||
// them validated. | ||
logOption := &logs.Options{Config: kubeletConfig.Logging} | ||
logOption.Apply() | ||
|
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.
@derekwaynecarr @mrunalp @sjenning
I am not as familiar with this part of the code to be sure that this is safe to do earlier like this.
Can one of you please review?
/close Solved differently in #106090 |
@pohly: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Without this, some error messages during startup are printed in
text format although JSON was requested.
Before:
After:
Special notes for your reviewer:
I noticed this while working on logging configuration for kubelet and other commands.
Does this PR introduce a user-facing change?