mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
fix duplicate validation error for quota editing
Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
parent
c37905c06c
commit
8bd7a09224
@ -72,8 +72,7 @@ func (resourcequotaStrategy) AllowCreateOnUpdate() bool {
|
|||||||
|
|
||||||
// ValidateUpdate is the default update validation for an end user.
|
// ValidateUpdate is the default update validation for an end user.
|
||||||
func (resourcequotaStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
|
func (resourcequotaStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
|
||||||
errorList := validation.ValidateResourceQuota(obj.(*api.ResourceQuota))
|
return validation.ValidateResourceQuotaUpdate(obj.(*api.ResourceQuota), old.(*api.ResourceQuota))
|
||||||
return append(errorList, validation.ValidateResourceQuotaUpdate(obj.(*api.ResourceQuota), old.(*api.ResourceQuota))...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (resourcequotaStrategy) AllowUnconditionalUpdate() bool {
|
func (resourcequotaStrategy) AllowUnconditionalUpdate() bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user