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-4191] - odh-model-controller should tolerate missing Authorino #177

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

spolti
Copy link
Member

@spolti spolti commented Mar 6, 2024

This commit allows to run ODH without Authorino when KServe is Removed.

Description

How Has This Been Tested?

  • Install the ODH Operator 2.8 through Operator Catalog.
  • Create Default DSCI
  • Create a DSC with the following content (KServe -> servinng - disabled):
kind: DataScienceCluster
apiVersion: datasciencecluster.opendatahub.io/v1
metadata:
  labels:
    app.kubernetes.io/created-by: opendatahub-operator
    app.kubernetes.io/instance: default
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/name: datasciencecluster
    app.kubernetes.io/part-of: opendatahub-operator
  name: default-dsc
spec:
  components:
    codeflare:
      managementState: Removed
    kserve:
      managementState: Managed
      serving:
        ingressGateway:
          certificate:
            type: SelfSigned
        managementState: Removed
        name: knative-serving
    modelregistry:
      managementState: Removed
    trustyai:
      managementState: Removed
    ray:
      managementState: Removed
    kueue:
      managementState: Removed
    workbenches:
      managementState: Removed
    dashboard:
      managementState: Managed
    modelmeshserving:
      devFlags:
        manifests:
          - contextDir: config
            sourcePath: ''
            uri: >-
              https://github.com/spolti/odh-model-controller/tarball/RHOAIENG-4191-test
      managementState: Managed
    datasciencepipelines:
      managementState: Removed
  • Note that the KServe - serving component is disabled, it should not log any error, instead, this message should be logged:
controllers.InferenceService    kserve service mesh component is enabled, Authorino is required.
  • Next step, update the DCS setting KServe/serving to Managed, install the Service Mesh Operator and don't install the Authorino operator, and watch the logs for the error:
2024-03-06T19:25:57Z	INFO	controllers.InferenceService	kserve component is enabled, Authorino is required
2024-03-06T19:26:33Z	ERROR	controller-runtime.source	if kind is a CRD, it should be installed before calling Start	{"kind": "AuthConfig.authorino.kuadrant.io", "error": "no matches for kind \"AuthConfig\" in version \"authorino.kuadrant.io/v1beta2\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/opt/app-root/src/go/pkg/mod/k8s.io/apimachinery@v0.27.0/pkg/util/wait/wait.go:154
k8s.io/apimachinery/pkg/util/wait.waitForWithContext
	/opt/app-root/src/go/pkg/mod/k8s.io/apimachinery@v0.27.0/pkg/util/wait/wait.go:207
k8s.io/apimachinery/pkg/util/wait.poll
	/opt/app-root/src/go/pkg/mod/k8s.io/apimachinery@v0.27.0/pkg/util/wait/poll.go:260
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/opt/app-root/src/go/pkg/mod/k8s.io/apimachinery@v0.27.0/pkg/util/wait/poll.go:200
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/source/source.go:136

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

This commit allows to run ODH without Authorino when KServe is Removed.

Signed-off-by: Spolti <fspolti@redhat.com>
check if the serving is enabled as service mesh is tied with Authorino.
this will allow rawDeployments to also work without Authorin.

Signed-off-by: Spolti <fspolti@redhat.com>
logMessage = "could not determine if kserve have service mesh enabled, Authorino integration will be enabled"
}

if enabled {
Copy link
Contributor

Choose a reason for hiding this comment

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

Almost! More feedback:
The DSC can be:

apiVersion: datasciencecluster.opendatahub.io/v1
kind: DataScienceCluster
metadata:
  name: default-dsc
spec:
  components:
    kserve: 
      managementState: "Removed",
      serving: 
        ingressGateway: 
          certificate: 
            type: SelfSigned
        name: "knative-serving",
        managementState: "Managed"

Notice kserve.managementState is Removed while serving.managementState is Managed. If KServe is removed, I think odh-model-controller don't need to care about authorino.

So, turns out we would need to check kserve.managementState == Managed && serving.managementState != Removed, to require authorino here.

I think I'm bad at explaining stuff.

Copy link
Member Author

Choose a reason for hiding this comment

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

both enabled, right.

okay.

Signed-off-by: Spolti <fspolti@redhat.com>
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.

/lgtm

Copy link
Contributor

openshift-ci bot commented Mar 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@openshift-merge-bot openshift-merge-bot bot merged commit efd4ba6 into opendatahub-io:main Mar 8, 2024
5 checks passed
@spolti spolti deleted the RHOAIENG-4191 branch March 15, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants