Can I have an OpenShift build trigger a sync of an ImageStream from an external Docker Repository? Can I have an OpenShift build trigger a sync of an ImageStream from an external Docker Repository? kubernetes kubernetes

Can I have an OpenShift build trigger a sync of an ImageStream from an external Docker Repository?


How about try to adjust Image Policy Configuration in /etc/origin/master/master-config.yaml ? This post is also helpful for your case, refer Automatically Update Red Hat Container Images on OpenShift 3.11 for more details.

Or when you images are pushed by CI/CD, you can consider to configure post trigger to execute oc import-image <imagestream name>:<tag> --confirm for manual sync.


I've managed to push to the remote repo and sync the ImageStream from the remote repo

In order to give a good answer some more information on how you did this will help greatly.

One way to solve your problem is to tag your docker registry with several tags and listen to one of these tags as a scheduled imageStreamTag in your ImageStream. That will make it (eventually) get deployed. You can do this in your CI pipeline.

If you want to deploy it right away after you have created a build you need to do something like

oc tag my.regisstry/group/name:<myBuildTag> isName:isTagName