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

[release-1.28] Remove handling code for glog #2534

Conversation

k8s-infra-cherrypick-robot

This is an automated cherry-pick of #2325

/assign jichenjc

NONE

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>
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>
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>
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>
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>
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 7, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 7, 2024
@dulek
Copy link
Contributor

dulek commented Feb 7, 2024

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2024
@dulek
Copy link
Contributor

dulek commented Feb 7, 2024

/hold

This is a weird error.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 7, 2024
@dulek
Copy link
Contributor

dulek commented Feb 8, 2024

/retest

@dulek
Copy link
Contributor

dulek commented Feb 8, 2024

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 8, 2024
@k8s-ci-robot k8s-ci-robot merged commit 16e948a into kubernetes:release-1.28 Feb 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants