-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement OpenShift Route creation for InferenceGraphs #480
base: release-v0.14
Are you sure you want to change the base?
Implement OpenShift Route creation for InferenceGraphs #480
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: israel-hdez The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
} | ||
|
||
func (r *OpenShiftRouteReconciler) Reconcile(ctx context.Context, inferenceGraph *v1alpha1.InferenceGraph) (string, error) { | ||
logger := log2.FromContext(ctx, "subreconciler", "OpenShiftRoute") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log2 seems something weird to me. is there a reason you use log2 instead of just log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a conflict with this variable:
var log = logf.Log.WithName("GraphKsvcReconciler") |
But I agree the naming is not good. I renamed to ctrlLog
.
Name: fmt.Sprintf("%s-route", inferenceGraph.Name), | ||
Namespace: inferenceGraph.Namespace, | ||
}, | ||
Spec: v1.RouteSpec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks it uses http protocol. do we need to use https?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be the goal of this Jira: https://issues.redhat.com/browse/RHOAIENG-18978
Type: routev1.RouteAdmitted, | ||
Status: v1.ConditionTrue, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for inferencegraph test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. I updated the CRD test file test/crds/route.openshift.io_routes.yaml
. This unit was failing after updating that CRD. I had to do these changes to make it pass again.
Something was wrong with the old CRD definition. The kube client typically doesn't save the Status
field. So, it made sense to me that the unit started failing. To fix, I had to do these changes to fist create the resource with k8sClient.Create()
and later update the status with k8sClient.Status().Update()
.
is this pr for release branch first? |
InferenceGraphs doesn't have any ingress reconciler. Despite that, in ODH we need a mechanism to expose InferenceGraphs. This implements exposing InferenceGraphs on OpenShift using Routes. Signed-off-by: Edgar Hernández <[email protected]>
8e68a19
to
7b2c188
Compare
I leaved |
What this PR does / why we need it:
InferenceGraphs doesn't have any ingress reconciler. Despite that, in ODH we need a mechanism to expose InferenceGraphs. This implements exposing InferenceGraphs on OpenShift using Routes.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes https://issues.redhat.com/browse/RHOAIENG-17831
Type of changes
Please delete options that are not relevant.
Feature/Issue validation/testing:
Checklist: