-
Notifications
You must be signed in to change notification settings - Fork 4.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
Openshift import-image call via REST API #7226
Comments
You can run any command with In this case, we do one of two things:
You can use the higher log level to see which your server supports doing. |
|
@Meems33 Sorry for coming late on this issue, but I notice per your comment that you seemed to successfully having an |
@zonArt you will need a dockercfg secret and link it to the project service account(s) (serviceaccount "default" for pull/push of images, "builder" for pull/push of S2I images). First, create a dockercfg type secret with your registry server URL, username and password (+ optional email). Then link it to the project serviceaccount. oc secret new-dockercfg registry-secret-name \
--docker-server=<registry URL> \
--docker-username=<username> \
--docker-password=<password> \
--docker-email=<email>
oc secrets link default <secret name> --for=pull
oc secrets link builder <secret name> --for=pull # For S2I builder image pull EDIT: Example ImageStream spec below
|
@tomcooperca Thank you, I'm aware that I need |
Is this possible?
I'm looking for a way to import images from an artifactory docker repository into an openshift internal docker repository (without using CLI). So far I have been able to use the openshift REST API to create an image stream that pulls from the repository and auto loads tags using this json:
If my repository has three tags "test1", "test2", and "latest" this will cause the stream to be created and then within a few seconds the images to be asynchronously synced.
I have not found a way to manually cause this sync to occur (outside of the command line and using oc image-import). Per the documentation import-image is not automated (yet), but I was hoping there was a way to trigger the sync without using the import-image command. I tried modifying annotation tags on the image stream but that does not appear to cause an update. Does this feature exist?
The text was updated successfully, but these errors were encountered: