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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call kubectl version command with --output=json flag #7032

Merged

Conversation

TiberiuGC
Copy link
Collaborator

@TiberiuGC TiberiuGC commented Aug 31, 2023

Description

Closes #6970

This PR refactors the logic of the kubectl client so that kubectl version calls are made with --output=json flag set.
Additionally, it backfills some missing unit tests around checking kubectl client and server versions and the corresponding validations.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 馃く

  • Backfilled missing tests for code in same general area 馃帀
  • Refactored something and made the world a better place 馃専

@TiberiuGC TiberiuGC marked this pull request as ready for review September 1, 2023 07:42
@TiberiuGC TiberiuGC marked this pull request as draft September 5, 2023 07:19
@TiberiuGC TiberiuGC marked this pull request as ready for review September 6, 2023 06:20
@TiberiuGC TiberiuGC enabled auto-merge (squash) September 14, 2023 09:06
@TiberiuGC TiberiuGC merged commit 90fb1ae into eksctl-io:main Sep 14, 2023
10 checks passed
IdanShohamNetApp pushed a commit to spotinst/weaveworks-eksctl that referenced this pull request Oct 19, 2023
)

* refactor kubectl client to use --output=json

* add unit tests for CheckAllCommands

* add unit tests for kubectl client

* rename interface to fix lint

* refactor kube client interface to interact only with version data

* remove unused vars

* fix get info test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] parsing kubectl version string (upstream error: ) / "0.0.0": Version string empty
2 participants