I'm attempting to trigger a deployment when an image is updated in OpenShift. The image is hosted in a private external docker registry. I've created an ImageStream
that maps to this external image. When I push a new image to the registry, I'd expect the ImageStream
to pick up the change somehow and update itself. However, when the external image is updated, the change is not immediately propagated to the ImageStream
. How can I keep the ImageStream
in sync with the image in our external registry?
I'm aware that I can tag the image with the --scheduled=true
flag to have the image periodically refreshed. The problem is that periodically isn't good enough. Is there a way to sync the changes immediately?
One way to have it updated immediately and trigger a new build, is to run:
oc import-image imagestreamname
If the image on remote registry has changed, this will result in image stream tags being updated, which will then trigger re-builds of anything dependent on the tag, if the tag was updated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With