What this PR does / why we need it:
With this PR, the Operator will, by default, create a CronJob in suspended state. This default CronJob will execute the following commands (in order) when manually executed -
feast apply
feast materialize-incremental $(date -u +'%Y-%m-%dT%H:%M:%S')
All Job commands are executed within a deployed Feature Store's running Pod.
In order to manually run this Job, the following command can be executed against the FeatureStore CR namespace -
# first we get the operator-deployed CronJob name for our installed FeatureStore CR
$ kubectl get feast/example -o template --template={{.status.cronJob}}
feast-example
# next, we run a Job in-cluster, templated from that CronJob
$ kubectl create job --from=cronjob/feast-example feast-example-job
Additionally, the Operator supports the ability to customize the CronJob to a user's liking. A user could change commands the CronJob executes and/or run it on a schedule, among other things.
For example, a user may instead want a materialize-incremental Job that runs on the hour -
spec:
cronJob:
containerConfigs:
commands:
- 'feast materialize-incremental $(date -u +''%Y-%m-%dT%H:%M:%S'')'
schedule: 0 * * * *
Or maybe they want a Job that, after an apply & materialize-incremental, will also install a python project's dependencies and run a script -
spec:
cronJob:
containerConfigs:
commands:
- feast apply
- 'feast materialize-incremental $(date -u +''%Y-%m-%dT%H:%M:%S'')'
- pip install -r ../requirements.txt
- cd ../ && python run.py
feastProjectDir:
git:
ref: 598a270
url: 'https://github.com/feast-dev/feast-credit-score-local-tutorial'
Which issue(s) this PR fixes:
Fixes #5220
Misc
This PR adds another image dependency in quay.io/openshift/origin-cli:4.17. We also update the operator-quickstart to lean on this new Job capability for much of the Demo notebook.