Automate Openshift pod rebuild on new Docker image

Viewed 630

I have a docker container image in our intranet hosted Gitlab registry. I can manually pull the image from our OpenShift installation and run up an arbitrary number of pods successfully. If I rebuild the image locally and push to Gitlab I can trigger a pod rebuild manually from Openshift. All this is working well.

How can I trigger the pod rebuild automatically whenever I push a new image to the Gitlab registry? I don't see anywhere to place hooks between OpenShift and Gitlab and all my reading about Image Streams hasn't resulted in a successful automated deployment pipeline. The deployed versions below;

GitLab Community Edition 9.4.6 23ec1ec Version

OpenShift Master: v3.5.5.15 Kubernetes Master: v1.5.2+43a9be4

Any help greatly appreciated

1 Answers

You possibly need to schedule update of image meta data.

That requires that feature be enabled globally in the OpenShift cluster though.

A better option may be to push the image direct into the OpenShift internal registry. That can trigger the new deployment automatically.

Related