-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Exit if --kubernetes-version is older than the oldest supported version #4759
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
deead30
start: compare specified kubernetes version with oldest supported ver…
serhatcetinkaya 578e325
Merge remote-tracking branch 'upstream/master'
serhatcetinkaya 2230a52
start: check force flag while comparing specified version
serhatcetinkaya 0b829cc
fix warnings
serhatcetinkaya 14b1d84
start.go rename exit.WithCode with exit.WithCodeT
serhatcetinkaya 23cc018
start.go make err type usable for exit.withCodeT
serhatcetinkaya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR!
If possible, I would rather not have two effective "oldest" constants. The intent of
constants.OldestKubernetesVersion
was to have a constant that defined the oldest possible version. If v1.9.x works, the variable should reflect that state.Do you mind updating
constants.OldestKubernetesVersion
to v1.9.0 so that the intent is met and the logic simple? If it happens to fail tests, we can stick with v1.10.x and add a--force
flag so that users can still bypass the check.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Thomas, thanks for the review.
As far as I understand this is the behavior requested in the original issue #4673. According to your input we can remove the check for
superOldVersionLimit
and just return a warning (without exit) to the user if the specified version is less thanconstants.OldestKubernetesVersion
.Can you check this comment to make things clear about what needs to be done #4673 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @serhatcetinkaya sorry for the confusion, I think I contributed to the confusion ! my fault !
Thomas is right, rethinking this I believe it would be hard to maintain two separate versions of supported kuberentes.
the original reason we created this issue was someone was trying to start an oddly old kubernetes by mistake (1.2 instead of 1.12)
here is my current new suggestion based on @tstromberg input:
we need to exit on oldest supported kubernets version however we need to infrom the user in the exit message, that to override this check please add "--force" so they can still run whatever version they want ( which we don't support at their own risk )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@serhatcetinkaya - Yes, that sounds like the right way to go. I spoke to Medya about this yesterday and he seemed willing to accept it as well. I've added my thoughts to the bug. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification @medyagh @tstromberg, I am working on this, I will submit as soon as I finish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huzzah! start.go now has support for a --force flag. If you change the logic to use it - I think we should merge this ASAP.
Please let me know if you need any help.