Skip to content

Commit

Permalink
fix scheme bugs in status.url and status.address.url for rawdeployment
Browse files Browse the repository at this point in the history
Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
  • Loading branch information
VedantMahabaleshwarkar committed Jan 13, 2025
1 parent 6f10dfb commit 2e39ba2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2652,7 +2652,7 @@ var _ = Describe("v1beta1 inference service controller", func() {
},
Address: &duckv1.Addressable{
URL: &apis.URL{
Scheme: "http",
Scheme: "https",
Host: fmt.Sprintf("%s-predictor.%s.svc.cluster.local:8443", serviceKey.Name, serviceKey.Namespace),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,15 @@ 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: "http",
Scheme: scheme,
Path: "",
}
if authEnabled {
Expand Down Expand Up @@ -337,13 +343,17 @@ func (r *RawIngressReconciler) Reconcile(isvc *v1beta1.InferenceService) error {
return err
}
internalHost := getRawServiceHost(isvc, r.client)
var scheme string
if authEnabled {
internalHost += ":" + strconv.Itoa(constants.OauthProxyPort)
scheme = "https"
} else {
scheme = "http"
}
isvc.Status.Address = &duckv1.Addressable{
URL: &apis.URL{
Host: internalHost,
Scheme: r.ingressConfig.UrlScheme,
Scheme: scheme,
Path: "",
},
}
Expand Down

0 comments on commit 2e39ba2

Please sign in to comment.