Closed weiling61 closed 2 years ago
@Fei-Guo @christopherhein
Can we just have ValidationPluginInterface defined with three methods
type ValidationPluginInterface interface {
Validation(client.Object, string) bool
GetTenantLocker(string) *sync.Mutex
Enabled() bool
}
so the changes to the Pod dws are straightforward. You can put rest of the code in
resources/validationplugin/validationplugin.go to a separate file called quotavalaidationPlugin which implements the interface. I would suggest to name the plugin as QuotaValidationPlugin
explicitly.
Also, please consider to move the validationplugin directory under resources/pod/
since the plugin works for Pod resource only.
For the plugin definition, can you just reuse the one that has been added in the util package? sigs.k8s.io/cluster-api-provider-nested/virtualcluster/pkg/util/plugin/plugin.go
@Fei-Guo Thanks for the review. Updated according to your review comments
@Fei-Guo updated according to your review comments.
What happened to the virtualcluster/README.MD file?
/lgtm /ok-to-test
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Fei-Guo, weiling61
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What this PR does / why we need it:
Following is the proposal for this feature: https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/docs/proposals/20220206-quota.md
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged): Following issue was originally raised: Performance and Resource Contention in Multiple Tenant Environment #240Fixes # Enhancement