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

Disable the delay check if .spec.maxDelaySeconds == 0 #516

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

masa213f
Copy link
Contributor

@masa213f masa213f commented Mar 10, 2023

This PR fixes the behavior when .spec.maxDelaySeconds is 0.
We made it possible to disable the delay check when .spec.maxDelaySeconds is 0 in #434.
However, that change seemed to be incorrect, so I fixed it.

In the current implementation, if we set .spec.maxDelaySeconds: 0 in the MySQLCluster, the default value (60s) is used as a delay.
Because MOCO (or kube-apiserver) cannot distinguish whether the 0 is the zero value of integer type or intentionally set.
This PR changes the type of maxDelaySeconds to the pointer of int. This will allow the MOCO to determine if the 0 is set intentionally or not.

Signed-off-by: Masayuki Ishii masa213f@gmail.com

Signed-off-by: Masayuki Ishii <masa213f@gmail.com>
@masa213f masa213f self-assigned this Mar 10, 2023
@masa213f masa213f requested a review from umezawatakeshi March 10, 2023 09:09
@umezawatakeshi
Copy link
Contributor

Do we have to test the case of maxDelaySeconds == 0 and nil?

Signed-off-by: Masayuki Ishii <masa213f@gmail.com>
@masa213f masa213f requested review from umezawatakeshi and removed request for umezawatakeshi March 14, 2023 09:29
@masa213f masa213f merged commit 399e4a7 into main Mar 16, 2023
@masa213f masa213f deleted the fix-max-delay-seconds branch March 16, 2023 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants