The controller will watch the Predictor custom resource events to extend the KServe modelmesh-serving controller behavior with the following capabilities:
- Openshift ingress controller integration.
It has been developed using Golang and Kubebuilder.
Follow the instructions below if you want to extend the controller functionality:
Unit tests have been developed using the Kubernetes envtest framework.
Run the following command to execute them:
make test
Install the CRD from the KServe modelmesh-serving repository as a requirement.
When running the controller locally, the admission webhook will be running in your local machine. The requests made by the Openshift API have to be redirected to the local port.
This will be solved by deploying the Ktunnel application in your cluster instead of the controller manager, it will create a reverse tunnel between the cluster and your local machine:
make deploy-dev -e K8S_NAMESPACE=<YOUR_NAMESPACE>
Run the controller locally:
make run -e K8S_NAMESPACE=<YOUR_NAMESPACE>
Build a new image with your local changes and push it to <YOUR_IMAGE>
(by
default quay.io/opendatahub/odh-model-controller
).
make image -e IMG=<YOUR_IMAGE>
Deploy the manager using the image in your registry:
make deploy -e K8S_NAMESPACE=<YOUR_NAMESPACE> -e IMG=<YOUR_IMAGE>