Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
318 views
in Technique[技术] by (71.8m points)

docker - updating openshift imagestream automatically

I have an openshift build that triggers when an imagestream updates. My imagestream is setup to pull the image with tag :latest from a remote gitlab registry. The imagestream can pull correctly and I can schedule it to check for updates using the schedule flag that checks for changes every 15 minutes.

The issue: I want the imagestream to update immediately (to trigger the build) when the upstream image updates. It doesn't, but the openshift documentation is unclear to me on whether it is supposed to. If it's not watching for image updates by default is there a way I can configure this?

question from:https://stackoverflow.com/questions/66067676/updating-openshift-imagestream-automatically

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

what you want is called image change trigger: https://docs.openshift.com/container-platform/4.6/builds/triggering-builds-build-hooks.html#builds-using-image-change-triggers_triggering-builds-build-hooks

Image change triggers allow your build to be automatically invoked when a new version of an upstream image is available. For example, if a build is based on top of a RHEL image, then you can trigger that build to run any time the RHEL image changes. As a result, the application image is always running on the latest RHEL base image.

this only works if you utilze imagestreams for your base images, you need an imagestream which tracks your base image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...