-
Notifications
You must be signed in to change notification settings - Fork 920
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
[MVP] add resourcequota plugin in scheduler-estimator: add resourcequota plugin #4566
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,11 +17,14 @@ limitations under the License. | |||||||||||||||||
package plugins | ||||||||||||||||||
|
||||||||||||||||||
import ( | ||||||||||||||||||
"github.com/karmada-io/karmada/pkg/estimator/server/framework/plugins/resourcequota" | ||||||||||||||||||
"github.com/karmada-io/karmada/pkg/estimator/server/framework/runtime" | ||||||||||||||||||
) | ||||||||||||||||||
|
||||||||||||||||||
// NewInTreeRegistry builds the registry with all the in-tree plugins. | ||||||||||||||||||
func NewInTreeRegistry() runtime.Registry { | ||||||||||||||||||
registry := runtime.Registry{} | ||||||||||||||||||
registry := runtime.Registry{ | ||||||||||||||||||
resourcequota.Name: resourcequota.New, | ||||||||||||||||||
} | ||||||||||||||||||
Comment on lines
+26
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Is it better? So that we can skip the effort to check the feature gate in multiple places when implementing the plugin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of controlling in the registry, do you think if we can have feature-gate check in each plugin.New function like https://github.com/karmada-io/karmada/pull/4566/files#diff-e489afa02e13c3ea92d007b4a8575045b8695f34cd31539769f2e28c3c0cb322R72-R77 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm saying that just because I see there are two places we need to check the feature-gate in the plugin. :) |
||||||||||||||||||
return registry | ||||||||||||||||||
} |
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.
Duplicated with
ObjectReference.Namespace
, why not share? Did I miss something?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.
That is because the ReplicaEstimator interface shares the same
ReplicaRequirements
struct with ResourceBinding:karmada/pkg/estimator/client/interface.go
Line 39 in f054313
I also noticed this issue at #4534 (comment).
Another reason just as mentioned in PR description:
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 issue is now tracked by #4578.