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

Warn about incompatible kubectl versions. #3377

Closed
wants to merge 2 commits into from

Conversation

bmcustodio
Copy link

This PR makes minikube output a warning message in case it detects a too-large version skew between the desired Kubernetes version and the version of kubectl that is found in PATH.

As part of this I ran dep ensure - even though I haven't introduced any dependencies -, and I got a bunch of updates to vendor/ as a result. As I am not sure these should go in, I am adding them as a separate commit.

Closes #3329.

Signed-off-by: Bruno Miguel Custodio <[email protected]>
Signed-off-by: Bruno Miguel Custodio <[email protected]>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 29, 2018
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

cmd/minikube/cmd/start.go Show resolved Hide resolved

// Warn the user if the version of kubectl doesn't fall within the allowed version range.
if !svKubernetesRange(svKubectlVersion) {
warn("The version of kubectl installed (%s) is not compatible with the desired Kubernetes version (%s).", svKubectlVersion, svKubernetesVersion)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather see this error out by default, and if necessary, we can add a --force flag to allow users to shoot themselves in the foot.

I find that users generally ignore warnings unless they have to correct for them. Incompatible kubectl versions tend to lead to very strange bug reports.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that I know a bit better - I'm OK with this warning. For consistency, could you make it use console.OutStyle("warning") though?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bmcstdio
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: jimmidyson

If they are not already assigned, you can assign the PR to them by writing /assign @jimmidyson in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@tstromberg
Copy link
Contributor

NOTE: Merge conflicts here should be relatively trivial to merge in.

@tstromberg tstromberg added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 26, 2019
@tstromberg
Copy link
Contributor

Marking closed for now, as there are merge conflicts to resolve and there hasn't been an update on this PR in some time. Please re-open if you get the chance to take a look at this again!

@tstromberg tstromberg closed this Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants