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

Use kubectl version --short if --output=json fails #7356

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

afbjorklund
Copy link
Collaborator

Really old kubernetes clients did not have the --output parameter

Show a friendly reminder to upgrade, instead of an error message.

Closes #7350

Really old kubernetes clients did not have the --output parameter

Show a friendly reminder to upgrade, instead of an error message.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2020
@codecov-io
Copy link

Codecov Report

Merging #7356 into master will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7356      +/-   ##
==========================================
- Coverage   37.16%   37.12%   -0.04%     
==========================================
  Files         145      145              
  Lines        8762     8771       +9     
==========================================
  Hits         3256     3256              
- Misses       5110     5119       +9     
  Partials      396      396              
Impacted Files Coverage Δ
cmd/minikube/cmd/start.go 35.64% <0.00%> (-0.52%) ⬇️

func kubectlVersion(path string) (string, error) {
j, err := exec.Command(path, "version", "--client", "--output=json").Output()
if err != nil {
// really old kubernetes clients did not have the --output parameter
Copy link
Member

Choose a reason for hiding this comment

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

just a nit, wouldn't hurt to info log the error.

@medyagh medyagh merged commit a24ae23 into kubernetes:master Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CentOS 7 kubectl is too old for the --output argument
4 participants