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

Allow ModelMesh and KServe to run in same namespace. #132

Closed

Conversation

vaibhavjainwiz
Copy link
Member

@vaibhavjainwiz vaibhavjainwiz commented Dec 12, 2023

Solving following issue with this PR:

Description

How Has This Been Tested?

Setup Env
Please follow below instruction to setup your env:
https://gist.github.com/vaibhavjainwiz/61045727dfda727f7577a6f97ca46563

Validate

  1. After above setup, verift both KServe and ModelMesh InferenceServices are running successfully.
  2. There should not be any error in log of KServe controller/Model Controller and runtime pods.
  3. Both isvc should be accessble using curl/grpc.
  4. Now delete ModelMesh InferenceService, KServe isvc should be running without any error.
  5. Now delete KServe isvc, all dependent resources should be deleted.

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

Copy link
Contributor

openshift-ci bot commented Dec 12, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Dec 12, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vaibhavjainwiz
Once this PR has been reviewed and has the lgtm label, please assign heyselbi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Signed-off-by: Vaibhav Jain <[email protected]>
Watches(&source.Kind{Type: &networkingv1.NetworkPolicy{}},
handler.EnqueueRequestsFromMapFunc(func(o client.Object) []reconcile.Request {
r.log.Info("Reconcile event triggered by Network Policy: " + o.GetName())
return r.getReconcileRequestsOnUpdateOfServingRuntime(o)

Choose a reason for hiding this comment

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

Is it right to call the getReconcileRequestsOnUpdateOfServingRuntime and not the getReconcileRequestsOnUpdateOfNetworkPolicy function?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, you are right. I make the wrong function call. Its not tracked in my testing earlier because both function do similiar task.
I had fixed the function call now.

return reconcileRequests
}

func (r *OpenshiftInferenceServiceReconciler) getReconcileRequestsOnUpdateOfNetworkPolicy(o client.Object) []reconcile.Request {

Choose a reason for hiding this comment

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

Do we really need this function? It seems to be equal, except 1 comment to the getReconcileRequestsOnUpdateOfServingRuntime

Copy link
Member Author

Choose a reason for hiding this comment

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

for now they are doing same task to return list of all InferenceServices in that namespace but we have task in our backlog to update the logic of getReconcileRequestsOnUpdateOfServingRuntime function.
https://issues.redhat.com/browse/RHOAIENG-1265

"sigs.k8s.io/controller-runtime/pkg/client"
)

type MMControllerNetworkPolicyReconciler struct {

Choose a reason for hiding this comment

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

Do we need the *Controller* into the name?

Copy link
Member Author

Choose a reason for hiding this comment

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

To fix this issue, I need to implement two NetworkPolicies :

  • allow access to expose Route
  • allow calls from odh-model-controller

To make visible distinction between these two NetworkPolicies, I had create file with below names :

  • mm_route_networkpolicy_reconciler.go
  • mm_controller_networkpolicy_reconciler.go

I am open to change their name to be more meaningful.

Signed-off-by: Vaibhav Jain <[email protected]>
@vaibhavjainwiz
Copy link
Member Author

Setting this PR to do-not-merge because NetworkPolicies created with this PR would not be required any more after https://issues.redhat.com/browse/RHOAIENG-1003 fix.

@israel-hdez
Copy link
Contributor

israel-hdez commented Mar 10, 2024

Setting this PR to do-not-merge because NetworkPolicies created with this PR would not be required any more after https://issues.redhat.com/browse/RHOAIENG-1003 fix.

May this PR is still relevant? I think RHOAIENG-1003 was reverted.

@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

@spolti
Copy link
Member

spolti commented Jun 14, 2024

Do we still need this PR?

Copy link
Contributor

openshift-ci bot commented Jul 15, 2024

@vaibhavjainwiz: 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/pr-image-mirror 874ccc8 link true /test pr-image-mirror
ci/prow/unit 874ccc8 link true /test unit

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.

@israel-hdez
Copy link
Contributor

Closing as stale...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants