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

Add --kubernetes-version to images command and sub-commands #1082

Closed
stealthybox opened this issue Feb 11, 2020 · 1 comment · Fixed by #1085
Closed

Add --kubernetes-version to images command and sub-commands #1082

stealthybox opened this issue Feb 11, 2020 · 1 comment · Fixed by #1085

Comments

@stealthybox
Copy link

stealthybox commented Feb 11, 2020

Hello 👋
Thanks for building Sonobuoy

I'm generating Node base-images that can be used for multi-node conformance testing.
I'd like to use the sonobuoy images pull command to pre-pull all of the necessary images before baking the base image. However, when baking the base image (which includes things like installing kubernetes and docker), there is no kubernetes cluster yet.

The sonobuoy images pull command currently requires a kubernetes API client which means I can't use it before running a kube-apiserver.

The kubeadm U/X for this same workflow is:

kubeadm config images pull --kubernetes-version v1.17.0

It does not require an API server.

I think the auto-version inspection using the APIserver is a smart default behavior, but could we add an optional --kubernetes-version flag to the following sonobuoy commands that would short-circuit the kubeAPI client dependency?

sonobuoy images --kubernetes-version v1.17.0
sonobuoy images pull --kubernetes-version v1.17.0
sonobuoy images push --kubernetes-version v1.17.0
sonobuoy images download --kubernetes-version v1.17.0
sonobuoy images delete --kubernetes-version v1.17.0

I think this will be especially helpful for testing multi-node clusters and shaking down flaky test-suites.

Cheers!

Environment:

  • Sonobuoy version: v0.17.2
  • Kubernetes version: (use kubectl version): v0.17.0
  • Kubernetes installer & version: v0.17.0
  • Cloud provider or hardware configuration: Vagrant virtualbox
  • OS (e.g. from /etc/os-release): Ubuntu 18.04
@stealthybox
Copy link
Author

stealthybox commented Feb 11, 2020

The code change would:

johnSchnake added a commit that referenced this issue Mar 18, 2020
If the cluster the user wants to get images for is not available
at the time (preparing images ahead of time, for a coworker, etc)
then the user needs a way to specify the version rather than relying
on the autodetection.

This change also causes the images from `sonobuoy images` to be printed
in a sorted order for consistency.

Fixes #1082

Signed-off-by: John Schnake <jschnake@vmware.com>
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 a pull request may close this issue.

1 participant