-
Notifications
You must be signed in to change notification settings - Fork 345
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
Include all necessary images in images pull/push commands #1028
Comments
it will be a good idea ,In China, I need to do a lot of work to complete the test:
|
The question I have here is what is the ideal way to specify which registry to use for the images? The mapping on the existing images is based on overriding each registry via the YAML file. We could:
|
It will definitely be tricky to get the user experience right here. I was initially leaning towards something like option 3 - with some modifications so that we could have an additional key in the yaml file (e.g. |
Im sorry to add comment in this closed ticket. Is it correct that i also need to get other test images? |
Hi @rplanteras! Don't apologise :) This workflow is quite complex - sorry you're having issues with it! There are a number of different images required to run Sonobuoy and the default plugins in an airgapped environment. Which image were you experiencing the image pull back-off error with? Warning: Lots of details ahead! Apologies if you know some of this already, but I'll outline some things below (to compare with our docs and use as the basis for improvement). To run Sonobuoy (and the E2E and systemd-logs plugins) in an airgapped environment, you need to have the following images available in the registry accessible from your cluster:
You can see the list of images required if you run
Note: Some of these images either require authentication or don't exist and will cause some errors during the pull/push steps below. These images can be safely ignored as they aren't required for the conformance tests. You need to pull those images and then push them to your custom registry. We've included a To pull the images use
To push the images, you need to tell which registry sonbouoy should push them to. For the images specific to the E2E tests, you need to provide a yaml file which tells Sonobuoy which registry to use in place of the registries used by Kubernetes. You can generate the default file with the following command:
Save this content to a file and update it replace every registry with the one you wish to use, for example:
You can then use this file with the
After this, all of the required images should be available in your registry. To make sure they are used, you need to pass the details when using
This is a lot of info - I hope it helps! Some of this info is missing from our docs unfortunately so I'll file a ticket to update them. |
Hello @zubron Good morning (its morning in the Philippines hehe). Thank you very much for the response. Actually, i tried to perform some of the steps above based on willzhang's post in this ticket. I have clarification about making sure the registry is accessible. Initially, I was thinking this might be the issue but when i tried to pull image from my private registry in a different server in my k8s cluster master, is this already considered as accessible? Thank you very much for accommodating my question. |
Hello @zubron . Good day. [root@sonobuoy-offline ~]# sonobuoy logs error streaming logs from container [kube-sonobuoy]: container "kube-sonobuoy" in pod "sonobuoy" is waiting to start: trying and failing to pull image[root@sonobuoy-offline ~]# [root@sonobuoy-offline ~]# [root@sonobuoy-offline ~]# --------------------------------------------------------------------- [root@sonobuoy-offline ~]# sonobuoy run --e2e-repo-config custom-registries.yaml --kube-conformance-image myregistry.local:5000/conformance:v1.17.2 --sonobuoy-image myregistry.local:5000/sonobuoy:v0.17.2 --systemd-logs-image myregistry.local:5000/systemd-logs:v0.3 --mode quick --wait INFO[0000] created object name=sonobuoy namespace= resource=namespaces INFO[0000] created object name=sonobuoy-serviceaccount namespace=sonobuoy resource=serviceaccounts INFO[0000] created object name=sonobuoy-serviceaccount-sonobuoy namespace= resource=clusterrolebindings INFO[0000] created object name=sonobuoy-serviceaccount-sonobuoy namespace= resource=clusterroles INFO[0000] created object name=sonobuoy-config-cm namespace=sonobuoy resource=configmaps INFO[0000] created object name=sonobuoy-plugins-cm namespace=sonobuoy resource=configmaps INFO[0000] created object name=sonobuoy namespace=sonobuoy resource=pods INFO[0000] created object name=repolist-cm namespace=sonobuoy resource=configmaps INFO[0001] created object name=sonobuoy-master namespace=sonobuoy resource=services << Execution does not end within the expected time of execution for quick mode >> --------------------------------------------------------------------- [root@k8s-master1 centos]# kubectl get pods -A | grep sonobuoy sonobuoy sonobuoy 0/1 ImagePullBackOff 0 5m42s [root@k8s-master1 centos]# kubectl get namespaces | grep sonobuoy sonobuoy Active 6m4s [root@k8s-master1 centos]# |
Hi again! If you can successfully pull an image from your private registry from a node in the cluster where Sonobuoy will be running then yes, the registry is considered accessible and as long as all the images are in the registry, and you perform the other steps it should work. Did you perform all the push/pull steps outlined above? Can you pull |
If you run |
Hello zubron. Issue is fix, the steps you mentioned were ok, its my cluster proxy configuration on the slave nodes that has issues. Thank you very much for your help. :) |
Describe the solution you'd like
If you want to use a custom registry, you can do it but it involves a lot of manual steps and the steps differ for the e2e and systmed-logs plugins. It's proving to be an error prone and confusing workflow.
I would like to modify the
images
command to take not only the e2e test images into account, but also the sonobuoy, conformance, and systemd-logs images. It would be ideal if users just needed to run one set of commands to pull and then push the images.The commands would also have to accept the
sonobuoy-image
andconformance-image
flags to allow custom images/versions to be used. If omitted we would use the defaults.The text was updated successfully, but these errors were encountered: