/graph-cache-refresh-job

A job which refreshes graph cache

GNU General Public License v3.0GPL-3.0

Graph cache refresh CronJob

This simple CronJob is part of Thoth deployment. It has a one simple goal - trigger re-builds of adviser-cached in OpenShift cluster. These builds are responsible for filling cache for adviser. See the following links for more info:

Implementation

The implementation of this CronJob is very simple - it just triggers OpenShift's generic webhook from within the cluster - everything else is done automatically based on the adjusted adviser s2i build - see adviser repo for more info:

Prerequisites

It is required to have s2i-thoth-ubi-8-py36 image imported in OpenShift's container image registry. If you haven't done so already, import it manually by running:

oc import-image s2i-thoth-ubi8-py36:latest

Or, you can also provide another container image (check OpenShift template parameters for IMAGE_STREAM and IMAGE_STREAM_TAG). The only requirement for the container image is cURL presence.

On provisioning, there is required to pass generic webhook URL which is triggered by this CronJob. You can obtain it by running:

oc describe bc adviser-cached