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

removing klog.Fatalf in favor of a shutdown request #625

Closed

Conversation

emsixteeen
Copy link
Contributor

Per this discussion in #619, this is an option to change klog.Fatalf() to favor of something less harsh.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign alculquicondor for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@alculquicondor
Copy link
Collaborator

I thought you had to upgrade klog?

@emsixteeen
Copy link
Contributor Author

This is in lieu of upgrading klog!

Being that the controller (in the cmd package) already uses kubeapiserver.SetupSignalHandler() to create the stopCh, we can also use kubeapiserver.RequestShutdown() to close that channel.

In the first conversation I mentioned that in order not to call klog.Fatalf(), then either klog would need to be upgraded, or another option could be explored. This is the other option.

By the time I tested whether kubeapiserver.RequestShutdown() would work, the #619 was already merged! 😄

@alculquicondor
Copy link
Collaborator

/close

let's leave it for now.

It might be better to wait to upgrade and convert all logs to structured logging.

@google-oss-prow google-oss-prow bot closed this Feb 5, 2024
Copy link

@alculquicondor: Closed this PR.

In response to this:

/close

let's leave it for now.

It might be better to wait to upgrade and convert all logs to structured logging.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@emsixteeen
Copy link
Contributor Author

/close

let's leave it for now.

It might be better to wait to upgrade and convert all logs to structured logging.

👍

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants