-
Notifications
You must be signed in to change notification settings - Fork 24
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: check for incompatible flavors #146
Conversation
adf9edb
to
366ee4a
Compare
LGTM, please don't forget to generate manifests with |
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!
internal/pkg/rpaas/k8s.go
Outdated
@@ -1289,6 +1289,11 @@ func (m *k8sRpaasManager) validateFlavors(ctx context.Context, instance *v1alpha | |||
if flavorObj.Spec.CreationOnly && !isCreation { | |||
return &ValidationError{Msg: fmt.Sprintf("flavor %q can used only in the creation of instance", f)} | |||
} | |||
|
|||
incompatibleFlavor := checkIncompatibleFlavors(flavorObj.Spec.IncompatibleFlavors, flavors) |
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 think is just cosmetic, but would be nice bring error message inside checkIncompatibleFlavors
and throw it instead a string to be more golang way to handle error
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.
nice :)
No description provided.