Skip to content

Commit 658bc5a

Browse files
shaloulcychuanyun.lcy
andauthored
webhook: fix validateQuotaTopology for root quota (#1918)
Signed-off-by: chuanyun.lcy <chuanyun.lcy@alibaba-inc.com> Co-authored-by: chuanyun.lcy <chuanyun.lcy@alibaba-inc.com>
1 parent 5afff95 commit 658bc5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/webhook/elasticquota/quota_topology_check.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ func (qt *quotaTopology) validateQuotaSelfItem(quota *v1alpha1.ElasticQuota) err
6969
// validateQuotaTopology checks the quotaInfo's topology with its parent and its children.
7070
// oldQuotaInfo is null wben validate a new create request, and is the current quotaInfo when validate a update request.
7171
func (qt *quotaTopology) validateQuotaTopology(oldQuotaInfo, newQuotaInfo *QuotaInfo, oldNamespaces []string) error {
72+
if newQuotaInfo.Name == extension.RootQuotaName {
73+
return nil
74+
}
75+
7276
if err := qt.checkIsParentChange(oldQuotaInfo, newQuotaInfo, oldNamespaces); err != nil {
7377
return err
7478
}

0 commit comments

Comments
 (0)