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

Add support for customizing terminationGracePeriodSeconds of the VTTablet pods #500

Conversation

yoheimuta
Copy link
Contributor

This PR introduces support for customizing the terminationGracePeriodSeconds of the VTTablet pods. Currently, this value is set to 30 minutes.

Having a fairly high terminationGracePeriodSeconds can lead to issues when adding sidecars that don't handle SIGTERM properly, resulting in long delays during the termination process. At least, this default constant value is not suitable for the use case of unmanaged tablets.

Similar to #406.

@mattlord mattlord added the enhancement New feature or request label Nov 29, 2023
@mattlord mattlord self-requested a review November 29, 2023 15:06
Copy link
Collaborator

@mattlord mattlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @yoheimuta ! I just had one nit about the existing var name. Let me know what you think.

if spec.Vttablet.TerminationGracePeriodSeconds != nil {
obj.Spec.TerminationGracePeriodSeconds = spec.Vttablet.TerminationGracePeriodSeconds
} else {
obj.Spec.TerminationGracePeriodSeconds = pointer.Int64Ptr(terminationGracePeriodSeconds)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, but I feel like we should rename this variable to defaultTerminationGracePeriodSeconds now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattlord Thank you for your review! I renamed it befb94e.

Copy link
Member

@frouioui frouioui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you @yoheimuta

@frouioui
Copy link
Member

frouioui commented Jan 3, 2024

Closing and re-opening to re-trigger the CI tests that are in Expected

@frouioui frouioui closed this Jan 3, 2024
@frouioui frouioui reopened this Jan 3, 2024
@frouioui frouioui merged commit 45cff37 into planetscale:main Jan 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants