Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
add enablement flag for nim #1330
base: incubation
Are you sure you want to change the base?
add enablement flag for nim #1330
Changes from 17 commits
42089a8
8b09a92
cf86046
59daf4d
11582fa
1395504
b19d8bf
da745e8
5dfaee8
6078979
a9321b6
8206fcb
c4a92ca
2ee890c
d5a6a33
44dac58
7ad5727
ea63a9e
473db6c
ba4cc15
7c57ea4
d60bc76
c96bf75
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
My understanding is that here we are updating the
params.env
only in theKServe
isManaged
, if not, the value in theparams.env
is untouched. However in theModelMesh
component reconciliation, theparams.env
value is updated regardless of the status of theKServe
component.It is probably not an issue but wonder if the behavior should be made consistent.
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.
The assumption is that NIM depends on Kserve. If Kserve is not managed, NIM shouldn't be either. If Kserve is not managed, is the Kserve component's reconciler running? How would you suggest making the behaviour consistent?
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 is a single reconciler for all the components, when one component is marked as
Removed
, the specific component reconcile is invoked and it deletes the related resources. In this case it would leave thenim-state
as it was defined previously, which I don't think it would be a problem, sinceKServe
would be set asRemoved
.In the
ModelMesh
however, thenim-state
is updated regardless of the fact that theModelMesh
is set toManaged
orRemoved
, see https://github.com/opendatahub-io/opendatahub-operator/pull/1330/files#diff-be28ef017be36951371e5f700cafcdad5925b03de9ae41d754825781f213aa78R131-R137.So for my POV, it should not be a problem, just want to double check.
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.
So if the Kserve's component has some cleanup logic in place, can we use it to set
nim-state
toremoved
ifkserve
is removed? That way, we can make both behaviours consistent.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.
Yes. it is the same
ReconcileComponent
metho, there is a checkenabled := k.GetManagementState() == operatorv1.Managed
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.
Is the ConfigMap being deleted when Kserve's component is removed?
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.
Yes it is, so yes, it is not an issue, my point was mainly about consistency in the code.
But I'm fine to leave it as it is.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
it is usually a good practice in golang to keep the happy path on the left, so
This holds true also for the if/else below
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.
@lburgazzoli.... updated ✅