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

Fix min version issue with k8s client #521

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

turip
Copy link
Contributor

@turip turip commented Aug 23, 2023

Context:

currently we have an error in the below with kubectl v1.28
default output is changed as same as --short flag

Error in local: command "kubectl version --short" failed.
error: exit status 1
stdout: ""
stderr: "error: unknown flag: --short\nSee 'kubectl version --help' for usage.\n"

Verified and works with kubectl v1.27 and 1.28 too.

Changes:
We support both versions of k8s by trying first the normal path, and if we get the old output back (that always starts with a version.Info string), then we fall back to the old logic.

This is a less restrictive version of #520 in regard the k8s version requirement.

@turip
Copy link
Contributor Author

turip commented Aug 23, 2023

@nicks May I ask you to take a look at this? Homebrew rolled out kubectl 1.28 and without this fix people will face the same issue soon.

Copy link
Member

@nicks nicks left a comment

Choose a reason for hiding this comment

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

LGTM!

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