klog: warn people that the flags may get removed in the future

Signed-off-by: Maël Valais <mael@vls.dev>
This commit is contained in:
Maël Valais 2023-03-21 16:42:48 +01:00 committed by Tim Ramlot
parent 88ad0193fc
commit 1c85525d45
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D

View File

@ -89,7 +89,9 @@ func AddFlags(opts *logsapi.LoggingConfiguration, fs *pflag.FlagSet) {
switch f.Name {
case "add_dir_header", "alsologtostderr", "log_backtrace_at", "log_dir", "log_file", "log_file_max_size",
"logtostderr", "one_output", "skip_headers", "skip_log_headers", "stderrthreshold":
fs.AddGoFlag(f)
pf := pflag.PFlagFromGoFlag(f)
pf.Deprecated = "this flag may be removed in the future"
fs.AddFlag(pf)
}
})