-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Allow version arg to be optional in "kubeadm upgrade apply" #53220
Conversation
/assign @luxas |
/test pull-kubernetes-unit |
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.
LGTM. Defer to @luxas though
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.
I could nit but
/lgtm
/approve
Added as cherry-pick candidate, b/c it fixes the UX for a deployed feature. |
@medinatiger please add a release note for this PR. |
/release-note-none |
/retest |
it will be good if this PR will have release note line, as it changes behaviour in UX |
/release-note "Allow version arg in kubeadm upgrade apply to be optional if config file already have version info" |
/retest Review the full test history for this PR. |
5 similar comments
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
/retest Review the full test history for this PR. |
/approve cancel |
ping @medinatiger |
Hey @medinatiger, do you have any questions about this PR? We really appreciate the effort and would love to get this in. |
@jamiehannaford, thanks for checking. Just back from vacation. I will find some bandwidth this week to address lucas's comment, and get this PR checked in. |
/test pull-kubernetes-verify |
1 similar comment
/test pull-kubernetes-verify |
@luxas could you please take a look for the modified PR? |
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.
Two nits only, but now this generally LGTM, thanks @medinatiger!
/approve
I'll let Tim merge this when the nits are fixed
@@ -52,6 +53,29 @@ func FetchConfiguration(client clientset.Interface, w io.Writer, cfgPath string) | |||
return versionedcfg, nil | |||
} | |||
|
|||
// FetchConfigurationFromFile fetch configuration from a file | |||
func FetchConfigurationFromFile(cfgPath string) (*kubeadmapiext.MasterConfiguration, error) { | |||
fmt.Println("[upgrade/config] FetchConfiguration From File.") |
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.
nit: I don't think this func should log anything...
func FetchConfigurationFromFile(cfgPath string) (*kubeadmapiext.MasterConfiguration, error) { | ||
fmt.Println("[upgrade/config] FetchConfiguration From File.") | ||
|
||
if cfgPath == "" { |
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.
Is this logic necessary or is this case redundant as it's handled inside of ReadFile()?
@medinatiger: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
It's optional if the config file contain the version information.
@timothysc I fixed the nit as pointed out by Lucas (I rebase them into a single CL, sorry for the inconvenience). Please merge when you have a chance |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: luxas, medinatiger, timothysc Associated issue: #460 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
This PR make the version arg optional if --config is specified and .KuberneteVersion is available.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #fixes kubernetes/kubeadm#460
Special notes for your reviewer: