Skip to content
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

Changed the Info type so that the config file can be displayed withou… #106228

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/kube-scheduler/app/options/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func LogOrWriteConfig(fileName string, cfg *config.KubeSchedulerConfiguration, c
}

if klog.V(2).Enabled() {
klog.InfoS("Using component config", "config", buf.String())
klog.Info("Using component config", "\n-------------------------Configuration File Contents Start Here---------------------- \n", buf.String(), "\n------------------------------------Configuration File Contents End Here---------------------------------\n")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would be giving up structured logging in this case. But I think it's better in this case.

@logicalhan WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serathius probably has a more informed opinion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be able to do it using structured logging, however we might need a special formatter struct for this.

cc @pohly for recommendation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A formatter doesn't help at the moment. Strings as values in a key/value pair will always be quoted in text output, that cannot be suppressed. It's worthwhile to add that, though, therefore I have filed #106262.

In the meantime this PR can and should be merged as-is.

}

if len(fileName) > 0 {
Expand Down