Skip to content
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

[RHOAIENG-16851] - Rawdeployment bug fixes #462

Conversation

VedantMahabaleshwarkar
Copy link

@VedantMahabaleshwarkar VedantMahabaleshwarkar commented Jan 8, 2025

What this PR does / why we need it:

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-16851

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
    Feature/Issue validation/testing:

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

    kserve:
      defaultDeploymentMode: RawDeployment
      devFlags:
        manifests:
          - contextDir: config
            sourcePath: overlays/odh
            uri: 'https://github.com/VedantMahabaleshwarkar/kserve/tarball/devflags'
          - contextDir: config
            sourcePath: ''
            uri: 'https://github.com/VedantMahabaleshwarkar/odh-model-controller/tarball/devflags'
      managementState: Managed
      serving:
        ingressGateway:
          certificate:
            type: OpenshiftDefaultIngress
        managementState: Managed
        name: knative-serving
  • Install DSC with devflags as given above.
  • Modify the inferenceservice-config ConfigMap in the ODH application namespace (opendatahub) as follows
    -- Add annotation opendatahub.io/managed: false
    -- Modify
service: |-
    {
        "serviceClusterIPNone": true
    }

to

service: |-
    {
        "serviceClusterIPNone": false
    }

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Release note:


Re-running failed tests

  • /rerun-all - rerun all failed workflows.
  • /rerun-workflow <workflow name> - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.

@VedantMahabaleshwarkar VedantMahabaleshwarkar changed the title J 16851 new Rawdeployment bug fixes Jan 8, 2025
@spolti
Copy link
Member

spolti commented Jan 8, 2025

what are these other commits?

@VedantMahabaleshwarkar
Copy link
Author

@spolti created this PR from the source branch for #459 (i.e https://github.com/spolti/kserve/tree/sync23). The reason for doing that is so that when #459 is merged, this PR will not have to rebase. Also, I needed the commits related to serviceIPNone from the sync PR.
Once the other PR is merged this PR should only show my commits on top

@israel-hdez
Copy link

@VedantMahabaleshwarkar The sync PR is merged. A rebase is needed, anyway, to remove the foreign commits.

@spolti
Copy link
Member

spolti commented Jan 13, 2025

What is the issue / PR that this PR is fixing?
Can you please add it in the commit message and in the description?

@VedantMahabaleshwarkar
Copy link
Author

What is the issue / PR that this PR is fixing?
Can you please add it in the commit message and in the description?

@spolti It is already mentioned in the description, but adding it here again : https://issues.redhat.com/browse/RHOAIENG-16851

@VedantMahabaleshwarkar VedantMahabaleshwarkar changed the title Rawdeployment bug fixes [RHOAIENG-16851] - Rawdeployment bug fixes Jan 13, 2025
@spolti
Copy link
Member

spolti commented Jan 13, 2025

I meant the commit msg, see, my point is after it is merged, it does not have info about the jira/issue was fixed.

@VedantMahabaleshwarkar
Copy link
Author

@spolti added jira number to all commit messages

…roxy if a transformer-container is present

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
@@ -80,9 +80,15 @@ func createRawURL(client client.Client, isvc *v1beta1.InferenceService, authEnab
return nil, err
}
} else {
var scheme string
if authEnabled {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about it, why are you enforcing auth only with SSL?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing this, the code looks cleaner.

var scheme string
		url = &apis.URL{
			Host:   getRawServiceHost(isvc, client),
			Scheme: "http",
			Scheme: scheme,
			Path:   "",
		}
		if authEnabled {
			url.Scheme = "https"
		} 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question, as ssl is being enforced, how the certificates are configured?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

certs : https://github.com/opendatahub-io/kserve/blob/master/pkg/controller/v1beta1/inferenceservice/reconcilers/service/service_reconciler.go#L176

All reported ISVC status schemes are according to what is expected in each case according to #419 (comment)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, code change is included in latest commit

if authEnabled {
internalHost += ":" + strconv.Itoa(constants.OauthProxyPort)
scheme = "https"
} else {
scheme = "http"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here:

        scheme = "http"
	if authEnabled {
		internalHost += ":" + strconv.Itoa(constants.OauthProxyPort)
		scheme = "https"
	} 

considering, the logic you wrote is the correct behavior for both cases.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in latest commit

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
@VedantMahabaleshwarkar
Copy link
Author

/retest

Copy link

openshift-ci bot commented Jan 14, 2025

@VedantMahabaleshwarkar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-slow 3fc65e2 link true /test e2e-slow
ci/prow/e2e-fast 3fc65e2 link true /test e2e-fast
ci/prow/e2e-raw 3fc65e2 link true /test e2e-raw

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link

@israel-hdez israel-hdez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is working great 💯

Suggested follow-up: when using auth, the internal endpoint has the form https://{something}.svc.cluster.local:8443. It will be much nicer/better if the Service would be mapping port 80 -> 8443 to prevent the explicit port in the URL.

/lgtm

Copy link
Member

@spolti spolti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VedantMahabaleshwarkar can you please create a jira for the follow-up suggested by @israel-hdez ?

Copy link

openshift-ci bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: israel-hdez, spolti, VedantMahabaleshwarkar

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:
  • OWNERS [VedantMahabaleshwarkar,israel-hdez,spolti]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@VedantMahabaleshwarkar VedantMahabaleshwarkar merged commit 13b5166 into opendatahub-io:master Jan 15, 2025
26 of 30 checks passed
VedantMahabaleshwarkar added a commit to VedantMahabaleshwarkar/kserve that referenced this pull request Jan 16, 2025
* [RHOAIENG-16851] fix scheme bugs in status.url and status.address.url for rawdeployment

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-16851] Remove component url temporarily

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-16851] Use transformer spec to set upstream port in oauth-proxy if a transformer-container is present

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-16851] address feedback

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

---------

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
(cherry picked from commit 13b5166)
openshift-merge-bot bot pushed a commit that referenced this pull request Jan 16, 2025
* add oauth-proxy to rawdeployments if odh auth label is present (#419)

* add oauth-proxy to rawdeployments if odh auth label is present
* remove ingress modifications
* bug fix
* consume oauth proxy params from configmap
* fix oauth proxy sar and minor bugs
* revert some unneeded changes
* add oauth proxy flag to prevent login page redirect on invalid request
* address feedback
* update to newer oauth proxy image
* minor fix
* fix unit test
* more feedback
* cookie secret
* test and other fixes
* fix lint issues
* address latest feedback
* missed import sort
* address more feedback
* bug fix
* fix lint error

(cherry picked from commit d987799)
Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* introduce service configuration at configmap level (kserve#3672)

(cherry picked from commit 23c0396)
Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-17229] - Routing and Headless Service Support in KServe Raw Mode Deployment

chore:	Follow up: remove the hardcoded clsuterIP setting and add the service
	configuration.

Signed-off-by: Spolti <[email protected]>
(cherry picked from commit 33b1600)

* [RHOAIENG-16851] - Rawdeployment bug fixes (#462)

* [RHOAIENG-16851] fix scheme bugs in status.url and status.address.url for rawdeployment

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-16851] Remove component url temporarily

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-16851] Use transformer spec to set upstream port in oauth-proxy if a transformer-container is present

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

* [RHOAIENG-16851] address feedback

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

---------

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
(cherry picked from commit 13b5166)

* go.mod fixes

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>

---------

Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
Co-authored-by: Filippe Spolti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants