Skip to content

Commit

Permalink
[RHOAIENG-16851] address feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
  • Loading branch information
VedantMahabaleshwarkar committed Jan 14, 2025
1 parent be3f5f3 commit 3fc65e2
Showing 1 changed file with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,14 @@ func createRawURL(client client.Client, isvc *v1beta1.InferenceService, authEnab
return nil, err
}
} else {
var scheme string
if authEnabled {
scheme = "https"
} else {
scheme = "http"
}
url = &apis.URL{
Host: getRawServiceHost(isvc, client),
Scheme: scheme,
Scheme: "http",
Path: "",
}
if authEnabled {
url.Host += ":" + strconv.Itoa(constants.OauthProxyPort)
url.Scheme = "https"
}
}
return url, nil
Expand Down Expand Up @@ -343,19 +338,18 @@ func (r *RawIngressReconciler) Reconcile(isvc *v1beta1.InferenceService) error {
return err
}
internalHost := getRawServiceHost(isvc, r.client)
var scheme string
url := &apis.URL{
Host: internalHost,
Scheme: "http",
Path: "",
}
if authEnabled {
internalHost += ":" + strconv.Itoa(constants.OauthProxyPort)
scheme = "https"
} else {
scheme = "http"
url.Host = internalHost
url.Scheme = "https"
}
isvc.Status.Address = &duckv1.Addressable{
URL: &apis.URL{
Host: internalHost,
Scheme: scheme,
Path: "",
},
URL: url,
}
isvc.Status.SetCondition(v1beta1.IngressReady, &apis.Condition{
Type: v1beta1.IngressReady,
Expand Down

0 comments on commit 3fc65e2

Please sign in to comment.