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

Remove handling code for glog #2325

Merged
merged 7 commits into from
Oct 3, 2023

Commits on Sep 7, 2023

  1. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    d0fc449 View commit details
    Browse the repository at this point in the history
  2. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    de63646 View commit details
    Browse the repository at this point in the history
  3. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    6413e2c View commit details
    Browse the repository at this point in the history
  4. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    c5a1830 View commit details
    Browse the repository at this point in the history
  5. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    4b92df2 View commit details
    Browse the repository at this point in the history
  6. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    eb7417f View commit details
    Browse the repository at this point in the history
  7. 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>
    stephenfin committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    c57e0ad View commit details
    Browse the repository at this point in the history