Skip to content

Commit

Permalink
webhook: fix concurrent map for quota topology (koordinator-sh#1940)
Browse files Browse the repository at this point in the history
Signed-off-by: chuanyun.lcy <chuanyun.lcy@alibaba-inc.com>
Co-authored-by: chuanyun.lcy <chuanyun.lcy@alibaba-inc.com>
  • Loading branch information
2 people authored and ls-2018 committed Mar 25, 2024
1 parent 237d8bb commit 1cdbd72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/webhook/elasticquota/quota_topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ func (qt *quotaTopology) fillQuotaDefaultInformation(quota *v1alpha1.ElasticQuot
return nil
}

qt.lock.Lock()
defer qt.lock.Unlock()

if quota.Labels == nil {
quota.Labels = make(map[string]string)
}
Expand Down

0 comments on commit 1cdbd72

Please sign in to comment.