-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat: Add accessmode, custom image, and image secret #98
Conversation
Signed-off-by: Ishaan Sehgal <[email protected]>
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.
registryName = os.Getenv("PRESET_REGISTRY_NAME")
We need to remove it from chart and code. We have formal API support to provide image ur.
api/v1alpha1/workspace_validation.go
Outdated
@@ -80,5 +84,10 @@ func (i *InferenceSpec) validateUpdate(old *InferenceSpec) (errs *apis.FieldErro | |||
if (i.Template != nil && old.Template == nil) || (i.Template == nil && old.Template != nil) { | |||
errs = errs.Also(apis.ErrGeneric("field cannot be unset/set if it was set/unset", "template")) | |||
} | |||
|
|||
if i.Preset.PresetMeta.AccessMode == "private" && i.Preset.PresetOptions.Image == "" { |
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.
This check is not needed for update case. Update always means old compares with new.
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 and I believe this check ensures image isn't changed:
!reflect.DeepEqual(i.Preset, old.Preset)
default: | ||
err := fmt.Errorf("preset model %s is not supported", presetName) | ||
return inference.PresetInferenceParam{}, err | ||
} | ||
|
||
inferenceObj.AccessMode = string(wObj.Inference.Preset.PresetMeta.AccessMode) | ||
if wObj.Inference.Preset.PresetOptions.Image != "" { |
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.
You need to check access mode here as well.
set the custom image, image pull secrets, and access mode for the inference object. This would allow for pulling from a custom image.