Skip to content

Commit

Permalink
fix: add quotas issue
Browse files Browse the repository at this point in the history
  • Loading branch information
YenchangChan committed Apr 17, 2024
1 parent 67998f5 commit 6f82648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2775,9 +2775,9 @@ func checkConfigParams(conf *model.CKManClickHouseConfig) error {

var quotas []string
quotas = append(quotas, model.ClickHouseUserQuotaDefault)
if len(conf.UsersConf.Profiles) > 0 {
if len(conf.UsersConf.Quotas) > 0 {
for _, quota := range conf.UsersConf.Quotas {
if common.ArraySearch(quota.Name, profiles) {
if common.ArraySearch(quota.Name, quotas) {
return errors.Errorf("quota %s is duplicate", quota.Name)
}
if quota.Name == model.ClickHouseUserQuotaDefault {
Expand Down

0 comments on commit 6f82648

Please sign in to comment.