Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Add KServe manifests to odh-manifests #838

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

ReToCode
Copy link
Contributor

@ReToCode ReToCode commented Jun 5, 2023

Description

This PR adds the initial manifests for KServe and necessary patches to make it run in ODH. It fetches the manifests from opendatahub-io/kserve and adds some final patches. So updates should be fairly simple in the future.

How Has This Been Tested?

It was tested using https://github.com/ReToCode/knative-kserve#installation-of-knative-with-service-mesh.

Use then use:

And test an InferenceService

cat <<-EOF | oc apply -f -
apiVersion: "serving.kserve.io/v1beta1"
kind: "InferenceService"
metadata:
  name: "sklearn-iris"
  namespace: kserve-demo
  annotations:
    sidecar.istio.io/inject: "true"
    sidecar.istio.io/rewriteAppHTTPProbers: "true"
    serving.knative.openshift.io/enablePassthrough: "true"
spec:
  predictor:
    model:
      runtime: kserve-sklearnserver
      modelFormat:
        name: sklearn
      storageUri: "gs://kfserving-examples/models/sklearn/1.0/model"
EOF

oc get isvc -n kserve-demo
NAME           URL                                                                                          READY   PREV   LATEST   PREVROLLEDOUTREVISION   LATESTREADYREVISION            AGE
sklearn-iris   http://sklearn-iris-kserve-demo.apps.rlehmann-ocp-4-12.serverless.devcluster.openshift.com   True           100                              sklearn-iris-predictor-00001   2m14s

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@openshift-ci
Copy link

openshift-ci bot commented Jun 5, 2023

Hi @ReToCode. Thanks for your PR.

I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@ReToCode ReToCode force-pushed the add-kserve-manifests branch 2 times, most recently from d3b1a4c to a0d8530 Compare June 5, 2023 07:02
@skonto
Copy link

skonto commented Jun 6, 2023

@ReToCode nice! I think the next step would be to have some basic testing (smoke tests) in https://github.com/opendatahub-io/odh-manifests/tree/master/tests/basictests? I am not aware of the CI work for ODH and KServe but it would be nice to be able to test the manifests and future work against Kserve examples etc.

@Jooho
Copy link
Contributor

Jooho commented Jun 9, 2023

@ReToCode Opendatahub operator is using kfctl and it is using the base folder as an entry point. I can help to change the structure a little bit to be worked by kfctl .
However, there is another issue. kfctl is not updated for a long time while kustomize keeps updating. So some parameters such as replacements in the kserve/default/kustomization.yaml does not seem that it is possible to be parsed by kfcfl. So even though we change the directory structure, it should not work at the moment.

@VaishnaviHire do we have the plan to support kustomize for the odh-manifests?

kserve/README.md Outdated Show resolved Hide resolved
kserve/README.md Outdated Show resolved Hide resolved
kserve/README.md Show resolved Hide resolved
kserve/README.md Outdated Show resolved Hide resolved
kserve/hack/update-kserve-manifests.sh Outdated Show resolved Hide resolved
kserve/hack/update-kserve-manifests.sh Outdated Show resolved Hide resolved
@ReToCode
Copy link
Contributor Author

ReToCode commented Jun 12, 2023

Opendatahub operator is using kfctl and it is using the base folder as an entry point. I can help to change the structure a little bit to be worked by kfctl .

@Jooho I updated the folder structure according to this, then we could have the following:

  - kustomizeConfig:
      repoRef:
        name: odh-manifests
        path: kserve/controller
    name: kserve-controller
  - kustomizeConfig:
      repoRef:
        name: odh-manifests
        path: kserve/runtimes
    name: kserve-runtimes

Would that work?

@danielezonca
Copy link

FYI ticket to discuss the inclusion of KServe into ODH

@Jooho
Copy link
Contributor

Jooho commented Jun 12, 2023

@ReToCode Technically it should be ok but I don't know why we need 2 entry points.

@ReToCode
Copy link
Contributor Author

@ReToCode Technically it should be ok but I don't know why we need 2 entry points.

Would have been for the runtimes (the namespace stuff). But if we omit it here, we can drop them.

@ReToCode
Copy link
Contributor Author

  • Updated the PR according to Add KServe manifests to odh-manifests #838 (comment)
  • Added new files to fix an issue with webhook-certificates
  • Resolved discussions that are now no longer relevant
  • Updated the description of the PR with an updated installation/testing manual
  • The two entrypoints are no longer necessary, as runtimes come from the template. For Kfdef is would be something like now:
  - kustomizeConfig:
      repoRef:
        name: odh-manifests
        path: kserve
    name: kserve

Still assuming that Serverless + Service Mesh are installed prior to installing ODH.

@danielezonca
Copy link

Issue for the PR (just for tracking) https://github.com/opendatahub-io/odh-manifests/issues/848

kserve/README.md Outdated Show resolved Hide resolved
kserve/README.md Outdated Show resolved Hide resolved
kserve/README.md Outdated Show resolved Hide resolved
kserve/README.md Outdated Show resolved Hide resolved
kserve/hack/build-kserve-manifests.sh Show resolved Hide resolved
kserve/kserve-built/kserve-built.yaml Outdated Show resolved Hide resolved
@skonto
Copy link

skonto commented Jun 23, 2023

From the base dir we include the variant:

base/kustomization.yam:

resources:
  - ../odh-overlays

Should not this be the other way around and run kustomize build kserve/odh-overlays instead of kustomize build kserve/base.
That is the common pattern I see, for example: https://github.com/kubernetes-sigs/kustomize/blob/master/examples/helloWorld/README.md#deploy.

Copy link
Contributor

@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.

@ReToCode Can you also, please, squash the commits?

kserve/base/kustomization.yaml Outdated Show resolved Hide resolved
Update folder structure and KServe fork url

Pre-build KServe manifests to avoid issues with kfctl

Change the webhook certificates

Add runtime field to example InferenceService

fix minor issues

fix labels

no cert-manager

no certmanager

Use images from quay.io/opendatahub version 0.10.2

Fetch manifests from opendatahub-io/kserve

Revert back to assembled manifests KServe manifests using `kustomize` directly

Remove istio-cni env variable in controller

Simplify folder structure

Use release-0.10 branch to generate built yaml

Fix configuration params
@ReToCode
Copy link
Contributor Author

ReToCode commented Jul 12, 2023

@ReToCode
Copy link
Contributor Author

ReToCode commented Jul 12, 2023

oc apply -f ./odh-core.yaml
error: resource mapping not found for name: "odh-core" namespace: "opendatahub" from "./odh-core.yaml": no matches for kind "KfDef" in version "kfdef.apps.kubeflow.org/v1"

Pretty sure this is not related to my changes.

/test odh-manifests-e2e

@israel-hdez
Copy link
Contributor

/retest

@israel-hdez
Copy link
Contributor

/retest

Tests look unstable... :-/

@Jooho
Copy link
Contributor

Jooho commented Jul 12, 2023

This PR does not have an integration test script for kserve. This is modelmesh one(https://github.com/opendatahub-io/odh-manifests/blob/kserve-prototype/tests/basictests/modelmesh.sh).

So the e2e test failure has nothing to do with this pr. I think we can add the test part with another PR after we merge this because we need these manifests as soon as possible.

@israel-hdez
Copy link
Contributor

/retest

One more time. If it doesn't pass, I'll find who can help with it.

@openshift-ci openshift-ci bot added the lgtm label Jul 12, 2023
@israel-hdez
Copy link
Contributor

/approve

@israel-hdez
Copy link
Contributor

/assign vaishnavihire

@israel-hdez
Copy link
Contributor

/retest

@@ -0,0 +1,8 @@
kserve-controller=quay.io/opendatahub/kserve-controller:v0.10.2
Copy link
Contributor

Choose a reason for hiding this comment

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

@israel-hdez do we need to update this to latest or v0.11-latest to avoid the anyuid issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Manifests are for 0.10. So, we could use v0.10-latest, which should also be patched. Doesn't it work?

Or, do we want to move to 0.11? In upstream 0.11 is still unreleased. So, I'm not sure...

Copy link
Contributor

Choose a reason for hiding this comment

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

I am ok any version that includes the changes regarding anyuid.

@LaVLaS
Copy link
Member

LaVLaS commented Jul 13, 2023

/retest

1 similar comment
@LaVLaS
Copy link
Member

LaVLaS commented Jul 13, 2023

/retest

@openshift-ci
Copy link

openshift-ci bot commented Jul 13, 2023

@ReToCode: The following test 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/odh-manifests-e2e d6827d4 link true /test odh-manifests-e2e

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/test-infra repository. I understand the commands that are listed here.

@LaVLaS
Copy link
Member

LaVLaS commented Jul 13, 2023

This appears to be an failure due to the odh operator deploying successfully during the CI test run. I am going to debug the live system to see what is causing the issue. Since this PR has no CI tests or modifies the existing functionality of any other components, this should merge regardless of the debug session

@LaVLaS
Copy link
Member

LaVLaS commented Jul 14, 2023

/approve

Merging this since the ocp411 passed and we have initial confirmation that the ocp412 issues are due to a bug in one of the openshift-ci build images outside of our control.

@israel-hdez @Jooho @ReToCode If there are plans to integrate this a feature into ODH, you'll need to add CI tests when these manifests are updated

@openshift-ci
Copy link

openshift-ci bot commented Jul 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@LaVLaS LaVLaS merged commit 7a25c7c into opendatahub-io:master Jul 14, 2023
4 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
9 participants