-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Can operator-sdk run bundle use local image? #6699
Comments
By reading the source code, I found that the mirror implementation logic supports getting the image from the local, but the local mirror logic is not checked at the time of calling. operator-sdk/internal/registry/image.go Lines 30 to 72 in 4abd483
But at the time of the call, no local judgment is made operator-sdk/internal/olm/operator/helpers.go Lines 37 to 40 in 4abd483
I was wondering if anyone could fix this? |
I recommend installing local registry like instructed here: https://kind.sigs.k8s.io/docs/user/local-registry/ After that, you can push to that registry and run a local bundle. For example, my quick test:
Personally I always have local registry installed in my kind setups, since it gives more "e2e" feeling in that sense. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
+1 I think this one would be useful. I've tried to setup the local flag, but there are other parts of the execution that are pulling the image later in order to get the bundle into a directory. |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Type of question
Hi, I am writing operator using operator-sdk. Recently I was looking for a solution on how to do e2e testing. I chose to use kind as a temporary test environment.
I started the kind node locally, and then built the operator image and bundle image locally. I used
kind load docker-image
to load the two images to the kind cluster. When I tried to initialize the test suite environment throughoperator-sdk run bundle
before the test, I found that operator-sdk would pull the images through the network.In CI environment, these operations are temporary, in order to verify that there is no problem with my logic, I think operator-sdk should first try to use the local bundle image, instead of pulling the remote repository, otherwise you need to provide a test repository to store the temporary image or special version. I think this mechanism is bad for development testing.
I want to ask is this something wrong with me or does operator-sdk run bundle always pull the image of the remote repository?
Question
What did you do?
make bundle
make bundle-build
kind load docker-image quay.io/zncdata/spark-k8s-operator-bundle:vv0.1.0
operator-sdk run bundle quay.io/zncdata/spark-k8s-operator-bundle:vv0.1.0
output:
What did you expect to see?
operator-sdk shoule use local image builded with docker, rather then pull bundle.
What did you see instead? Under which circumstances?
above
Environment
Operator type:
golang
Kubernetes cluster type:
$ operator-sdk version
$ go version
(if language is Go)$ kubectl version
Additional context
The text was updated successfully, but these errors were encountered: