-
Notifications
You must be signed in to change notification settings - Fork 55
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
Use ServiceMeshMember resources to enroll namespaces to the service mesh #219
Use ServiceMeshMember resources to enroll namespaces to the service mesh #219
Conversation
Skipping CI for Draft Pull Request. |
d3e5110
to
313ec20
Compare
Currently, odh-model-controller is editing the `ServiceMeshMemberRoll` resource to enroll and remove namespaces from the service mesh. Unfortunately, such resource is typically managed by a mesh administrator (it is unique per control plane), and it is not expected to be edited by 3rd parties. With these changes odh-model-controller will stop doing changes to the `ServiceMeshMemberRoll` resource. Instead, namespaces are enrolled to the mesh by using the `ServiceMeshMember` resource (no `Roll` suffix). This resource is created inside the namespace that is wanted to be enrolled to the mesh. Unfortunately, it is not possible to migrate previous setups to the `ServiceMeshMember` resource. Since the `ServiceMeshMemberRoll` resource is unique per mesh control plane, it is not possible to determine if a namespace was enrolled by odh-model-controller or if it was enrolled by the user. Thus, a migration is more risky than leaving the SMCP as is (i.e. there is the risk to remove namespaces where there are no InferenceServices, but the user enrolled and mesh features are needed there). Signed-off-by: Edgar Hernández <[email protected]>
313ec20
to
36090ba
Compare
"smm.desired.smcp_name", desiredSMM.Spec.ControlPlaneRef.Name, | ||
"smm.current.smcp_namespace", existingSMM.Spec.ControlPlaneRef.Namespace, | ||
"smm.current.smcp_name", existingSMM.Spec.ControlPlaneRef.Name) | ||
// Don't return error because it is not recoverable. It does not make sense |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we, we shouldn't touch resources owned by another component, instead a manual change needs to be done.
hey @ederign is it possible to get manifest for early testing ? |
@mwaykole did you mean @israel-hdez instead? |
Which kind of manifests would you need? |
@israel-hdez Here's my testing results: Testing on 2.9.1:
Testing on 2.10 (latest build available at time of testing):
After retesting first scenario on 2.10, it is working as expected (same as what is reported above, but now the IS goes into Loaded state and I can query the model) - might've been a fluke on the first go, I'll keep an eye on it for 2.10 Due to all of the above, this PR LGTM with the suggestion to keep an eye on test results for 2.10 |
"app.kubernetes.io/name": "odh-model-controller", | ||
"app.kubernetes.io/component": "kserve", | ||
"app.kubernetes.io/part-of": "odh-model-serving", | ||
"app.kubernetes.io/managed-by": "odh-model-controller", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there reusable constants for these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: israel-hdez, lugi0, spolti, terrytangyuan 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 |
Currently, odh-model-controller is editing the
ServiceMeshMemberRoll
resource to enroll and remove namespaces from the service mesh. Unfortunately, such resource is typically managed by a mesh administrator (it is unique per control plane), and it is not expected to be edited by 3rd parties.With these changes odh-model-controller will stop doing changes to the
ServiceMeshMemberRoll
resource. Instead, namespaces are enrolled to the mesh by using theServiceMeshMember
resource (noRoll
suffix). This resource is created inside the namespace that is wanted to be enrolled to the mesh.Unfortunately, it is not possible to migrate previous setups to the
ServiceMeshMember
resource. Since theServiceMeshMemberRoll
resource is unique per mesh control plane, it is not possible to determine if a namespace was enrolled by odh-model-controller or if it was enrolled by the user. Thus, a migration is more risky than leaving the SMCP as is (i.e. there is the risk to remove namespaces where there are no InferenceServices, but the user enrolled and mesh features are needed there).Fixes: https://issues.redhat.com/browse/RHOAIENG-1043
Fixes: https://issues.redhat.com/browse/RHOAIENG-6711
How Has This Been Tested?
Manifests for testing can be taken from here: https://github.com/israel-hdez/odh-model-controller/blob/j1043-smmr-to-smm-manifests/config/base/params.env
The DSC of the operator can be as follows:
Test cases:
ServiceMeshMember
resource has been created in the namespace.ServiceMeshMember
resource is deleted.ServiceMeshMemberRoll
resource that the namespace has been removed from the mesh (look at thestatus.members
field).members
of theServiceMeshMemberRoll
(docs) or by creating aServiceMeshMember
resource in the newly created namespace (docs)ServiceMeshMember
resource, check that it won't be deleted.ServiceMeshMemberRoll
resource that the namespace is still in the mesh (look at thestatus.members
field).Merge criteria: