Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove handling code for glog (kubernetes#2325)
* client-keystone-auth: Remove duplicate pflag.Parse call This is already handled by the earlier call to the (confusingly named) 'InitFlags' function provided by 'k8s.io/component-base/cli/flag' [1]. [1] https://github.com/kubernetes/component-base/blob/v0.28.1/cli/flag/flags.go#L51-L59 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> * k8s-keystone-auth: Remove duplicate pflag.Parse call This is already handled by the earlier call to the (confusingly named) 'InitFlags' function provided by 'k8s.io/component-base/cli/flag' [1]. We need to move the handling for the '--version' flag to after this to ensure we parse the flags first. [1] https://github.com/kubernetes/component-base/blob/v0.28.1/cli/flag/flags.go#L51-L59 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> * barbican-kms-plugin: Remove unnecessary klog flag calls The comment here seems to have been left over when this module was extensively reworked in commit 7f1e9ed (kubernetes#2278). In any case, it's unnecessary: the call to 'klog.InitFlags' with a 'nil' argument results in the flags being registered against the global 'flag.CommandLine' flagset [1], but since cobra uses pflag rather than flag this doesn't do anything useful. You can validate this by simply building the binary without this change: you'll note that we only have '-v' and '-vmodule' arguments, which are actually added by 'cli.Run' [2][3][4]. As such, we can simply remove the calls. [1] https://github.com/kubernetes/klog/blob/v2.100.1/klog.go#L432-L434 [2] https://github.com/kubernetes/component-base/blob/v0.28.1/cli/run.go#L46 [3] https://github.com/kubernetes/component-base/blob/v0.28.1/cli/run.go#L120 [4] https://github.com/kubernetes/component-base/blob/v0.28.1/logs/logs.go#L73-L105 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> * cinder-csi-plugin: Remove handling for glog The kubernetes ecosystem has migrated to klog now and the flags registered are for klog [1]. As such, there is no need to continue translating from glog to klog. [1] https://github.com/kubernetes/component-base/blob/v0.28.1/logs/logs.go#L73-L105 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> * manila-csi-plugin: Remove handling for glog Remove the code to handle translation of legacy glog options to klog options since glog is no longer a thing in kubernetes. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> * client-keystone-auth: Remove handling for glog As with our earlier change to cinder-csi-plugin, the handling code for glog is no longer necessary now that the kubernetes ecosystem has migrated to klog. However, unlike that change, client-keystone-auth is not using cobra but rather plain old pflag. As a result, it is still actually registering all the klog options. We preserve this behavior. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> * k8s-keystone-auth: Remove handling for glog This is quite similar but not identical to the earlier removal of glog handling in client-keystone-auth. As with that utility, we are using pflag rather than cobra here, but unlike that utility the klog options are not being registered. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> --------- Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
- Loading branch information