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
Fix: Ensure odh-model-controller Deployment Waits for ConfigMap #361
Fix: Ensure odh-model-controller Deployment Waits for ConfigMap #361
Changes from all commits
bc452e7
2d2fc18
def7e1a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
shouldn't we keep it as optional?
I mean, the os.GetEnv is ok if the env is not set( with the suggested change), however, if for some reason it is not set in during the startup, it would prevent odh to start.
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.
@spolti I believe the intent is to block the deployment until the configmap is ready which I believe is the expected behavior for having the optional value defaulted to false
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.
@spolti
We have two different default behaviours, for IBM the default is "removed", and for everyone else, it's "managed". So we need the ConfigMap to be configured properly by the operator-controller and we cannot decide a default value without the ConfigMap.
Is this feasible? Both the Deployment and the ConfigMap are created by the same kustomization file. The ConfigMap is used and probably required by other parts too.
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.
How is this achieved?
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.
@TomerFi I understand why you choose
removed
for the condition. I am ok with it.However, I have a question about the IBM case. How can you set the default value
removed
?The configmap manifests will be reside in RHOAI operator so it can not be editable after release.
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.
I imagin the pipelins running for IBM set the DataScienceCluster.spec.kserve.nim.managedState to "removed", this gets translated into the params.env before executing the kustomization file that creates both the ConfigMap and the Deployment.
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.
if Opendatahub operator have the logic, it makes sense then.
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.
Reading back my comment, I think I was unclear. When I wrote:
We have two different default behaviours
, of course, we don't actually have two defaults, sorry about that. My point was, we can't decide what default value to use, hence we must rely on the ConfigMap that always has the correct value for us.